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.

A181558 Index of first occurrence of 2n in A031883, or 0 if 2n never occurs in A031883 = first differences of lucky numbers A000959.

Original entry on oeis.org

1, 2, 6, 20, 31, 14, 126, 85, 36, 145, 140, 122, 376, 231, 162, 483, 692, 600, 993, 1188, 1106, 2440, 1080, 2814, 2586, 450, 2696, 3473, 4254, 4857, 5918, 2364, 4760, 4818, 21192, 13116, 19284, 14855, 12158, 31032, 18174, 15068, 35700, 56846, 27367, 33716, 13736, 16746, 103292, 8541
Offset: 1

Views

Author

M. F. Hasler, Oct 31 2010

Keywords

Examples

			a(1)=1 is the least index i such that A000959(i)+2*1 = A000959(i+1), since A000959(1) = 1 and A000959(2) = 3.
a(2)=2 is the least index i such that A000959(i)+2*2 = A000959(i+1), since A000959(2) = 3 and A000959(3) = 7.
a(3)=6 is the least index i such that A000959(i)+2*3 = A000959(i+1); indeed A000959(7) - A000959(6) = 21 - 15 is the earliest gap of 6 in A000959.
		

Crossrefs

Cf. A038664 (analog for primes).

Programs

  • PARI
    a(n) = for( i=1,1e9, A031883[i]==2*n & return(i)) /* will issue an error if 2n is not found in A031883 */

Formula

a(n) = min { k | A031883(k)=2n } = min { k | A000959(k+1)=A000959(k)+2n }.

Extensions

a(20)-a(50) from Nathaniel Johnston, Nov 15 2010