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.

A279480 Numbers n such that n+1 and n^4+1 are primes.

Original entry on oeis.org

1, 2, 4, 6, 16, 28, 46, 82, 88, 106, 180, 198, 210, 228, 238, 276, 312, 352, 430, 442, 466, 498, 540, 556, 568, 600, 616, 690, 732, 738, 742, 760, 768, 772, 786, 810, 856, 928, 936, 952, 966, 996, 1038, 1150, 1152
Offset: 1

Views

Author

Ely Golden, Dec 12 2016

Keywords

Comments

For any n > 1 in this sequence, (n+1)*(n^4+1) has the same nonzero digits as its prime factors in base n. - Ely Golden, Dec 12 2016

Crossrefs

Cf. A070689 (the similar sequence for n+1 and n^2+1)

Programs

  • Mathematica
    Select[Range@ 2000, Times @@ Boole@ Map[PrimeQ, {# + 1, #^4 + 1}] == 1 &] (* Michael De Vlieger, Dec 13 2016 *)
    Select[Range[2000],AllTrue[1+{#,#^4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 13 2019 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,lim+1, if(isprime(1+(p-1)^4), listput(v, p-1))); Vec(v) \\ Charles R Greathouse IV, Dec 13 2016
  • SageMath
    c=1
    index=1
    while(index<=1000):
        if((is_prime(c+1))&(is_prime(c**4+1))):
            print(str(index)+" "+str(c))
            index+=1
        c+=1
    print("complete")
    

Formula

a(n) >> n log^2 n. - Charles R Greathouse IV, Dec 13 2016