|
|
A261716
|
|
Odd numbers that result in a prime when their cubes are concatenated with the cubes of all smaller odd numbers in descending order.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
A000578(3) = 27. The only odd number less than 3 is 1 with A000578(1) = 1. Concatenating the two resulting cubes in descending order one gets 271 which is prime, so 3 is a term of the sequence.
|
|
MATHEMATICA
|
fQ[n_] := PrimeQ[ FromDigits[ Flatten[ IntegerDigits[ Range[2n - 1, 1, -2]^3]]]]; k = 1; lst = {}; While[k < 1501, If[ fQ[k], AppendTo[lst, 2k - 1]; Print[2k - 1]]; k++]; lst (* Robert G. Wilson v, Sep 16 2015 *)
|
|
PROG
|
(PARI) odd(n) = 2*n-1
con(n) = s=""; k=n; while(k > 0, s=Str(s, Str(odd(k)^3)); k--); eval(s)
isok(n) = ispseudoprime(con(n))
terms(n) = i=0; x=1; while(i < n, if(isok(x), print1(odd(x), ", "); i++); x++)
terms(4) \\ print initial four terms
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|