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!)
A084122 Numbers k such that k*prime(k) is a palindrome. 9
1, 2, 5, 12, 16, 3623, 4119, 618725, 708567, 1498739, 2762990591 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(12) > 3.7*10^12. - Giovanni Resta, Jun 28 2013
LINKS
EXAMPLE
4119 is in the sequence since the 4119th prime is 39119 and 4199*39119 = 161131161 is a palindrome.
MAPLE
ispal:= proc(n) local L;
L:= convert(n, base, 10);
L = ListTools:-Reverse(L);
end proc:
R:= NULL: count:= 0: p:= 1:
for k from 1 while count < 11 do
p:= nextprime(p);
if ispal(k*p) then R:= R, k; count:= count+1 fi
od:
R; # Robert Israel, Feb 22 2023
MATHEMATICA
palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; t={}; Do[If[palQ[Prime[n]*n], AppendTo[t, n]], {n, 15*10^5}]; t (* Jayanta Basu, May 11 2013 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d); \\ A002113
isok(k) = ispal(k*prime(k)) \\ Alexandru Petrescu, Feb 22 2023
(Python)
from sympy import sieve
def ok(n): return n and (s := str(n*sieve[n])) == s[::-1]
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Feb 22 2023
CROSSREFS
Sequence in context: A102718 A219954 A066267 * A042143 A042467 A024465
KEYWORD
base,nonn,more
AUTHOR
Giovanni Resta, May 14 2003
STATUS
approved

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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)