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.

User: Frederic Isenmann

Frederic Isenmann's wiki page.

Frederic Isenmann has authored 2 sequences.

A282329 Start with 2, then successively subtract the primes 3, 5, 7, ...

Original entry on oeis.org

2, -1, -6, -13, -24, -37, -54, -73, -96, -125, -156, -193, -234, -277, -324, -377, -436, -497, -564, -635, -708, -787, -870, -959, -1056, -1157, -1260, -1367, -1476, -1589, -1716, -1847, -1984, -2123, -2272, -2423, -2580, -2743, -2910
Offset: 1

Author

Frederic Isenmann, Feb 12 2017

Keywords

Examples

			a(1) = 2 - 3 = -1;
a(2) = 2 - 3 - 5 = -6.
		

Crossrefs

Programs

  • Mathematica
    FoldList[#1 - #2 &, 2, Prime@ Range[2, 39]] (* Michael De Vlieger, Feb 12 2017 *)
  • PARI
    lista(nn) = {s = prime(1); print1(s, ", "); for (n=2, nn, s -= prime(n); print1(s, ", "););} \\ Michel Marcus, Feb 12 2017
  • Python
    from sympy import prime, isprime
    sub=2
    print(sub, end=", ")
    for i in range (3, 200, 2):
        if (isprime(i)==True):
            sub=sub-i
            print(sub, end=", ")
    

Formula

a(n) = A007504(n+1) - 2*A071148(n-1).

A282319 a(n) = (2097203 mod n)^2 + (2097203 mod n) + 41.

Original entry on oeis.org

41, 43, 47, 53, 53, 71, 53, 53, 71, 53, 131, 173, 61, 53, 113, 53, 281, 71, 47, 53, 347, 131, 347, 173, 53, 347, 71, 53, 151, 593, 547, 421, 461, 281, 53, 593, 83, 503, 347, 53, 197, 347, 97, 1033, 593, 347, 313, 1301, 53, 53, 1097, 1933, 2203, 71
Offset: 1

Author

Frederic Isenmann, Feb 11 2017

Keywords

Comments

This sequence gives 168 prime numbers for n=1 to 168 with 63 different primes. This formula is based on the lucky numbers of Euler.

Examples

			For n = 23, a(23) = 17^2+17+41 = 347, and 347 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[#^2 + # + 41 &@ Mod[2097203 , n], {n, 54}] (* Michael De Vlieger, Feb 12 2017 *)
    f[n_]:=Module[{x=Mod[2097203,n]},x^2+x+41]; Array[f,60] (* Harvey P. Dale, Jul 28 2017 *)
  • PARI
    a(n)=subst(x^2+x+41,x,2097203%n) \\ Charles R Greathouse IV, Feb 14 2017
  • Python
    def formul(i):
        return ((i*i+2097203)%i)*((i*i+2097203)%i)+((i*i+2097203)%i)+41
    for i in range(1, 169):
        n=formul(i)
        print(n, end=", ")