A002781
Palindromic cubes.
Original entry on oeis.org
0, 1, 8, 343, 1331, 1030301, 1367631, 1003003001, 10662526601, 1000300030001, 1030607060301, 1334996994331, 1000030000300001, 1033394994933301, 1331399339931331, 1000003000003000001, 1003006007006003001, 1331039930399301331
Offset: 1
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Revised Edition), Penguin Books, 1997, entry 10662526601, page 188.
- T. D. Noe, Table of n, a(n) for n = 1..89 (from De Geest)
- Patrick De Geest, Palindromic Cubes
- G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]
- G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Rec. Math., 5 (No. 1, 1972), 11-19. [Annotated scanned copy]
- G. J. Simmons, Palindrome cubes: Problem B-183, Fibonacci Quart. 8 (1970), no. 5, p. 551.
-
Select[Range[0,12*10^5]^3,PalindromeQ[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 02 2017 *)
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
lista(nn) = my(list = List(), c); for (n=0, sqrtnint(nn, 3), if (ispal(c=n^3), listput(list, c));); Vec(list); \\ Michel Marcus, Oct 21 2021
Thanks to Pierre Genix (Pierre.Genix(AT)wanadoo.fr) and
Harvey P. Dale who pointed out that there were errors in earlier versions of this sequence.
A069748
Numbers k such that k and k^3 are both palindromes.
Original entry on oeis.org
0, 1, 2, 7, 11, 101, 111, 1001, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001, 1010000101, 1100000011, 10000000001
Offset: 1
-
isPalin[n_] := (n == FromDigits[Reverse[IntegerDigits[n]]]); Do[m = n^3; If[isPalin[n] && isPalin[m], Print[{n, m}]], {n, 1, 10^6}]
-
ispal(n) = my(d=digits(n)); d == Vecrev(d);
isok(n) = ispal(n) && ispal(n^3); \\ Michel Marcus, Dec 16 2018
A348319
Perfect powers m^k, k >= 2 that are palindromes while m is not a palindrome.
Original entry on oeis.org
676, 69696, 94249, 698896, 5221225, 6948496, 522808225, 617323716, 942060249, 10662526601, 637832238736, 1086078706801, 1230127210321, 1615108015161, 4051154511504, 5265533355625, 9420645460249, 123862676268321, 144678292876441, 165551171155561, 900075181570009
Offset: 1
676 = 26^2, 10662526601 = 2201^3, 12120030703002121 = 110091011^2 are terms.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Revised Edition), Penguin Books, 1997, entry 10662526601, page 188.
- Michael Keith, Classification and enumeration of palindromic squares, J. Rec. Math., Vol. 22, No. 2 (1990), pp. 124-132. [Annotated scanned copy]. See foot of page 130.
- Gustavus J. Simmons, Palindromic Powers, J. Rec. Math., Vol. 3, No. 2 (1970), pp. 93-98 [Annotated scanned copy]
-
seq[max_] := Module[{m = Floor@Sqrt[max], s = {}, n, p}, Do[If[PalindromeQ[k], Continue[]]; n = Floor@Log[k, max]; Do[If[PalindromeQ[(p = k^j)], AppendTo[s, p]], {j, 2, n}], {k, 1, m}]; Union[s]]; seq[10^10] (* Amiram Eldar, Oct 12 2021 *)
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
lista(nn) = {my(list = List()); for (k=2, sqrtint(nn), if (!ispal(k), my(q = k^2); until (q > nn, if (ispal(q), listput(list, q)); q *= k;););); vecsort(list,,8);} \\ Michel Marcus, Oct 20 2021
-
def ispal(n): s = str(n); return s == s[::-1]
def aupto(limit):
aset, m, mm = set(), 10, 100
while mm <= limit:
if not ispal(m):
mk = mm
while mk <= limit:
if ispal(mk): aset.add(mk)
mk *= m
mm += 2*m + 1
m += 1
return sorted(aset)
print(aupto(10**13)) # Michael S. Branicky, Oct 12 2021
A135066
Primes p such that p^3 is a palindrome.
Original entry on oeis.org
a(3) = 11 because 11^3 = 1331 is a palindrome.
Cf.
A002780 (cube is a palindrome),
A069748 (n and n^3 are both palindromes),
A002781 (palindromic cubes),
A135067 (palindromic cubes of primes).
-
Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
-
from sympy import nextprime
def ispal(n): s = str(n); return s == s[::-1]
p = 2
while True:
if ispal(p**3): print(p)
p = nextprime(p) # Michael S. Branicky, Feb 07 2021
A135067
Palindromic cubes p^3, where p is a prime.
Original entry on oeis.org
8, 343, 1331, 1030301
Offset: 1
a(3) = 1331 because 11^3 = 1331 is a palindrome and 11 is a prime.
Cf.
A002780 = Cube is a palindrome. Cf.
A069748 = Numbers n such that n and n^3 are both palindromes. Cf.
A002781 = Palindromic cubes. Cf.
A135066 = Primes p such that p^3 is a palindrome.
-
Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
Select[Prime[Range[200]]^3,PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 26 2021 *)
A190839
a(n) is the greatest prime divisor of 10^(2*n)+10^n+1.
Original entry on oeis.org
37, 37, 333667, 9901, 2906161, 333667, 10838689, 99990001, 440334654777631, 2906161, 1344628210313298373, 999999000001, 900900900900990990990991, 10838689, 4185502830133110721, 9999999900000001, 13168164561429877, 440334654777631, 3931123022305129377976519, 39526741
Offset: 1
-
f[n_]:=Max[Transpose[FactorInteger[10^(2n)+10^n+1]][[1]]]; Array[f,20] (* Harvey P. Dale, Jun 10 2011 *)
-
u(n)=10^(2*n)+10^n+1; for(n=1,30,f=factor(u(n));print1(f[matsize(f)[1],1],", ")) \\ Joerg Arndt, May 27 2011
A348429
Perfect powers m^k, m >= 1, k >= 2 such that m and m^k both are palindromes.
Original entry on oeis.org
1, 4, 8, 9, 121, 343, 484, 1331, 10201, 12321, 14641, 40804, 44944, 1002001, 1030301, 1234321, 1367631, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 1003003001, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004
Offset: 1
First few terms are equal to 1, 2^2, 2^3, 3^2, 11^2, 7^3, 22^2, 11^3, 101^2, 111^2, 11^4 = 121^2, 202^2, 212^2, 1001^2, 101^3, 1111^2, 111^3.
-
Block[{n = 10^6, nn, s}, s = Select[Range[2, n], PalindromeQ]; nn = Max[s]^2; {1}~Join~Union@ Reap[Table[Do[If[PalindromeQ[m^k], Sow[m^k]], {k, 2, Log[m, nn]}], {m, s}]][[-1, -1]]] (* Michael De Vlieger, Oct 18 2021 *)
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
isok(m) = if (m==1, return (1)); my(p); ispal(m) && ispower(m, , &p) && ispal(p); \\ Michel Marcus, Oct 19 2021
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
lista(nn) = {my(list = List(1)); for (k=2, sqrtint(nn), if (ispal(k), my(q = k^2); until (q > nn, if (ispal(q), listput(list, q)); q *= k;););); vecsort(list,,8);} \\ Michel Marcus, Oct 20 2021
-
# see link for faster version
def ispal(n): s = str(n); return s == s[::-1]
def aupto(limit):
aset, m, mm = {1}, 2, 4
while mm <= limit:
if ispal(m):
mk = mm
while mk <= limit:
if ispal(mk): aset.add(mk)
mk *= m
mm += 2*m + 1
m += 1
return sorted(aset)
print(aupto(10**11)) # Michael S. Branicky, Oct 18 2021
A087988
Palindromic numbers whose squares and cubes are equally palindromic.
Original entry on oeis.org
0, 1, 2, 11, 101, 111, 1001, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001
Offset: 1
-
rev:=proc(a) local aa,ct: aa:=convert(a,base,10): ct:=nops(aa): add(10^(ct-j)*aa[j],j=1..ct) end: p:=proc(n) if rev(n)=n and rev(n^2)=n^2 and rev(n^3)=n^3 then n else fi end: seq(p(n),n=0..12*10^5); # Emeric Deutsch, May 01 2005
-
ispal(n) = my(d = digits(n)); Vecrev(d) == d;
isok(n) = ispal(n) && ispal(n^2) && ispal(n^3); \\ Michel Marcus, Oct 25 2015
A191355
Indices of terms in A069748 with two decimal digits 1 and all others 0.
Original entry on oeis.org
5, 6, 8, 9, 12, 15, 18, 22, 27, 31, 37, 43, 49, 56, 64, 71, 80, 89, 98, 108
Offset: 1
A191356
Interpret the terms of A069748 having only decimal digits 0 and 1 as binary numbers and then convert those numbers to decimal.
Original entry on oeis.org
0, 1, 3, 5, 7, 9, 17, 21, 27, 33, 45, 51, 65, 73, 99, 129, 153, 165, 195, 257, 273, 297, 325, 367, 513, 561
Offset: 1
A069748(10)=10101 is the eighth number of A069748 having only digits 0 and 1. The binary number 10101 equals 21 in decimal. Thus a(8)=21.
Showing 1-10 of 10 results.
Comments