[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Revision History for A029967 (Underlined text is an addition; strikethrough text is a deletion.)

Showing entries 1-10 | older changes
A029967 Palindromic in bases 12 and 10.
(history; published version)
#31 by Peter Luschny at Mon Mar 23 03:01:42 EDT 2020
STATUS

reviewed

approved

#30 by Michel Marcus at Mon Mar 23 02:54:52 EDT 2020
STATUS

proposed

reviewed

#29 by Joerg Arndt at Mon Mar 23 02:41:10 EDT 2020
STATUS

editing

proposed

#28 by Joerg Arndt at Mon Mar 23 02:41:00 EDT 2020
MATHEMATICA

NextPalindrome[n_] := Block[{l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[idn, Ceiling[l/2]] ]] FromDigits[ Take[idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[idn, Ceiling[l/2]], Reverse[ Take[idn, Floor[l/2]] ]]], idfhn = FromDigits[ Take[idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[idfhn], Drop[ Reverse[ IntegerDigits[idfhn]], Mod[l, 2]] ]]] ]]]; palQ[n_Integer, base_Integer] := Block[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; l = {0}; a = 0; Do[a = NextPalindrome[a]; If[ palQ[a, 12], AppendTo[l, a]], {n, 400000}]; l (* Robert G. Wilson v, Sep 30 2004 *)

Select[Range[0, 10^5], ], PalindromeQ[#] && # == IntegerReverse[#, 12] &] (* _Robert Price_, Nov 09 2019 *)

PalindromeQ[#] && # == IntegerReverse[#, 12] &] (* Robert Price, Nov 09 2019 *)

STATUS

proposed

editing

#27 by Michel Marcus at Sun Mar 22 18:19:30 EDT 2020
STATUS

editing

proposed

#26 by Michel Marcus at Sun Mar 22 18:19:24 EDT 2020
LINKS

P. Patrick De Geest, <a href="http://www.worldofnumbers.com/nobase10.htm">Palindromic numbers beyond base 10</a>

STATUS

proposed

editing

#25 by F. Chapoton at Sun Mar 22 17:13:26 EDT 2020
STATUS

editing

proposed

#24 by F. Chapoton at Sun Mar 22 17:13:11 EDT 2020
PROG

.... s = digits(n, b)

.... return s == s[::-1]

.... if l > 0:

........ yield 0

........ for x in range(1, l+1):

............ for y in range(10**(x-1), 10**x):

................ s = str(y)

................ yield int(s+s[-2::-1])

............ for y in range(10**(x-1), 10**x):

................ s = str(y)

................ yield int(s+s[::-1])

STATUS

approved

editing

Discussion
Sun Mar 22 17:13
F. Chapoton: use space to indent python code
#23 by N. J. A. Sloane at Sat Nov 09 10:40:57 EST 2019
STATUS

reviewed

approved

#22 by Joerg Arndt at Sat Nov 09 09:25:34 EST 2019
STATUS

proposed

reviewed

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 15:13 EDT 2024. Contains 375545 sequences. (Running on oeis4.)