cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A261716 Odd numbers that result in a prime when their cubes are concatenated with the cubes of all smaller odd numbers in descending order.

Original entry on oeis.org

3, 27, 115, 643
Offset: 1

Views

Author

Felix Fröhlich, Aug 29 2015

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

First 4 terms confirmed by Robert G. Wilson v, Sep 16 2015 and no more < 3000.