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.

Showing 1-2 of 2 results.

A120291 Numerator of determinant of n X n matrix with elements M[i,j] = (1+Prime[i])/Prime[i] if i=j and 1 otherwise.

Original entry on oeis.org

3, 1, 11, 3, 29, 1, 59, 1, 101, 1, 1, 3, 239, 47, 1, 191, 21, 251, 569, 64, 1, 12, 25, 482, 1061, 1, 1, 98, 1481, 797, 1721, 926, 3, 8, 3, 1214, 1, 458, 1, 1544, 99, 1724, 1213, 1916, 1, 2, 1, 3, 4889, 853, 5351, 1, 49, 3041, 2113, 3301, 6871, 3571, 2473, 10, 2661
Offset: 1

Views

Author

Alexander Adamchuk, Jul 08 2006, Aug 19 2006

Keywords

Comments

Many a(n), such as 3,11,29,59,101,239,569,1061,1481,1721,4889.., are primes of form p(1)+...+p(k)+1 where p(i) =i-th prime A053845. It appeares that all primes of this form are presented in a(n) in their natural order.
Indices n such that a(n) = 1 are {2,6,8,10,11,15,21,26,27,37,39,45,47,52,75,84,87,88,91,94,...} = A121744[n] Numbers n such that (1 + Sum[Prime[k],{k,1,n}]) = (1 + A007504[n]) divides primorial number p(n)# = Product[Prime[k],{k,1,n}] = A002110[n].

Crossrefs

Programs

  • Mathematica
    Numerator[Table[Det[DiagonalMatrix[Table[1/Prime[i],{i,1,n}]]+1],{n,1,70}]]
    Table[Numerator[(1+Sum[Prime[k],{k,1,n}])/Product[Prime[k],{k,1,n}]],{n,1,100}]

Formula

a(n) = numerator[Det[DiagonalMatrix[Table[1/Prime[i],{i,1,n}]]+1]].
a(n) = Numerator[ (1 + Sum[ Prime[k], {k,1,n} ]) / Product[ Prime[k], {k,1,n} ] ]. a(n) = Numerator[ (1 + A007504[n]) / A002110[n] ].

A257077 a(n) = prime(n)-prime(1)-prime(2)-...-prime(k), while the result > 0.

Original entry on oeis.org

2, 1, 3, 2, 1, 3, 7, 2, 6, 1, 3, 9, 13, 2, 6, 12, 1, 3, 9, 13, 15, 2, 6, 12, 20, 1, 3, 7, 9, 13, 27, 2, 8, 10, 20, 22, 28, 3, 7, 13, 19, 21, 31, 33, 37, 2, 14, 26, 30, 32, 36, 1, 3, 13, 19, 25, 31, 33, 39, 43, 2, 12, 26, 30, 32, 36, 3, 9, 19, 21, 25, 31, 39
Offset: 1

Views

Author

Keywords

Comments

It appears that a(n) = n occurs only for n=3, 7, 13. It also appears that a(n+1) is never equal to a(n).
The list of indices such that a(n)=1 correspond to the primes in A053845. - Michel Marcus, Apr 16 2015
In other words, a(n) = prime(n) - A007504(k) for largest k such that prime(n) > A007504(k). - Danny Rorabaugh, Apr 20 2015

Examples

			a(1) = 2, since there is no previous prime.
a(2) = 1, since 3 - 2 = 1.
a(3) = 3, since 5 - 2 = 3.
a(4) = 2, since 7 - 2 - 3 = 2.
a(5) = 1, since 11 - 2 - 3 - 5 = 1.
a(6) = 3, since 13 - 2 - 3 - 5 = 3.
a(13) = 13, since 41 - 2 - 3 - 5 - 7 - 11 = 13.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; i = 1; While[i <= 1000, x = Prime[i]; k = 1; While[x > 0, x -= Prime[k]; k++]; x += Prime[k - 1]; AppendTo[lst, x]; i++]; lst
  • PARI
    a(n) = {s = prime(n); k = 1; while ((ns = (s - prime(k))) > 0, s = ns; k++); s;} \\ Michel Marcus, Apr 16 2015
    
  • PARI
    s=0; q=2; forprime(p=2,10, if(s+q>p, s+=q; q=nextprime(q+1)); print1(p-s", ")) \\ Charles R Greathouse IV, Apr 22 2015

Formula

a(n) << sqrt(n)*log(n). - Charles R Greathouse IV, Apr 23 2015
Showing 1-2 of 2 results.