|
Search: id:A104154
|
|
|
| A104154 |
|
For each natural number n: if the last digit of n is not zero and A004086(n) is prime, append A004086(n) to the sequence. |
|
+0 1
|
|
| 2, 3, 5, 7, 11, 31, 41, 61, 71, 13, 23, 43, 53, 73, 83, 17, 37, 47, 67, 97, 19, 29, 59, 79, 89, 101, 401, 601, 701, 211, 311, 811, 911, 421, 521, 821, 131, 331, 431, 631, 241, 541, 641, 941, 151, 251, 751, 461, 661, 761, 271, 571, 971, 181, 281, 881
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
EXAMPLE
|
The last digit of 13 is not '0' and 31 is prime, therefore we append 31.
|
|
MATHEMATICA
|
a = Select[Range[196], IntegerDigits[ # ][[ -1]] != 0 && PrimeQ[FromDigits[Reverse[ IntegerDigits[ # ]]]] &]; b = {}; For[n = 1, n < Length[a] + 1, n++, AppendTo[b, FromDigits[Reverse[IntegerDigits[a[[n]]]]]]]; b
|
|
PROGRAM
|
(PARI) rprime(n) = { local(x, y, v); for(x=1, n, y=rev(x); v=Vec(y); if(left(y, 1)<> "0"&isprime(eval(y)), print1(y", ")) ) } rev(str) = \ Get the reverse of the input string { local(tmp, s, j); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp), 1, -1, s=concat(s, tmp[j])); return(s) }
|
|
CROSSREFS
|
Sequence in context: A157158 A155833 A028867 this_sequence A123214 A119834 A095180
Adjacent sequences: A104151 A104152 A104153 this_sequence A104155 A104156 A104157
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
Cino Hilliard (hillcino368(AT)gmail.com), Mar 09 2005
|
|
EXTENSIONS
|
Edited by Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Aug 01 2007
|
|
|
Search completed in 0.002 seconds
|