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.

A189409 a(n) = prime(n)#^2 + 1, where prime(n)# is the n-th primorial (A002110).

Original entry on oeis.org

2, 5, 37, 901, 44101, 5336101, 901800901, 260620460101, 94083986096101, 49770428644836901, 41856930490307832901, 40224510201185827416901, 55067354465423397733736101, 92568222856376731590410384101
Offset: 0

Views

Author

John M. Campbell, Apr 21 2011

Keywords

Comments

A variation of Euclid numbers. It is unknown whether or not numbers in this sequence are always squarefree. It is unknown whether or not there exist infinitely many primes in this sequence. For Euclid numbers see A006862.
Comment from Abhiram R Devesh, Jan 23 2013: (Start)
(i) The last 3 digits of an entry is always either 101 or 901 (with the exception of the first 3 terms),
(ii) the thousand's place digit is an even number.
(End)

Examples

			(p_16#)^2+1 = 1062053250251407755176413469419400772901 is prime.
		

Crossrefs

A002110, A006862, A014545, A210482 (subsequence of primes).

Programs

  • Mathematica
    Table[Product[Prime[n]^2, {n, 1, k}] + 1, {k, 0, 16}]
    Join[{2},FoldList[Times,Prime[Range[20]]]^2+1] (* Harvey P. Dale, Jan 15 2019 *)
  • PARI
    list(maxx)={n=prime(1); cnt=0;print("0  2");
    while(n<=maxx,q=(prodeuler(p=1,n,p))^2+1;cnt++;
    print(cnt,"  ",q); n=nextprime(n+1)); } \\ Bill McEachen, Feb 03 2014
  • Python
    from functools import reduce
    import numpy as np
    def factors(n):
        return reduce(list._add_, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
    mul = 1
    for i in range(1, 20):
        if len(factors(i))<3:
            mul *= i*i
            print(mul+1, factors(mul+1))
    # Abhiram R Devesh, Jan 23 2013
    

Formula

a(n)=(E(n)-1)^2+1, where E(n) is the n-th Euclid number.

Extensions

Typo in Mma fixed by Vincenzo Librandi, Feb 04 2014