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.

A260488 Numbers of the form 2^m * (6k + 1) for m, k >= 0, and 0.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 13, 14, 16, 19, 25, 26, 28, 31, 32, 37, 38, 43, 49, 50, 52, 55, 56, 61, 62, 64, 67, 73, 74, 76, 79, 85, 86, 91, 97, 98, 100, 103, 104, 109, 110, 112, 115, 121, 122, 124, 127, 128, 133, 134, 139, 145, 146, 148, 151, 152, 157
Offset: 0

Views

Author

Keywords

Comments

Alternate definition: starting with a(0) = 0, include 2n if n is in the sequence, and include 2n+1 if no two previous terms sum to 2n+1.
It suffices to prove this for odd n. If n == 3(6), n-2 == 1 (mod 6); if n == 5 (mod 6), n-4 == 1 (mod 6). However, if n == 1 (mod 6), any even k in the sequence, 0 < k < n, will have k !== 0 (mod 3), and so n-k != 1 (mod 3), so it is not in the sequence; thus n must be.
Every nonnegative integer is the sum of two members of this sequence; every positive integer is the sum of two distinct members of this sequence. For odd n, this is by the construction in the alternate definition; and for even n, by induction n/2 = i + j, and so n = 2i + 2j.
It follows that:
* No member of this sequence except 0 is a multiple of 3.
* The sequence has a density of 1/3.
* The difference between consecutive terms is always one of {1, 2, 3, 5, 6}, and each of these occurs infinitely often, with 1 having density 1/3 and the others having density 1/6.
* The sequence is closed under multiplication.
* The primes in the sequence are A045375.

Examples

			Using the alternate definition:
1 is in the sequence because it is not the sum of 2 elements from {0}.
2 is in the sequence because 2 = 2*1, and 1 is in the sequence.
3 is not in the sequence because 3 = 1 + 2, and 1 and 2 are in the sequence.
6 is not in the sequence because 6 = 2*3, and 3 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    sort([0, seq(seq(2^m*(6*k+1), k = 0 .. floor((N/2^m - 1)/6)), m = 0 .. ilog2(N))]);  # Robert Israel, Aug 25 2015
  • Mathematica
    mx=160;Join[{0},Sort@Flatten@Table[2^m*(6k+1),{m,0,Log2[mx]},{k,0,mx/(6*2^m)}]] (* Robert G. Wilson v, Aug 16 2015 *)
  • PARI
    alist(n) = my(r=vector(n),j,k);r[1]=0;j=1;while(j
    				
  • PARI
    alim(n)={my(p=1,p2=p,r,j);
      for(k=1,n,
        if(if(k%2==0, polcoeff(p,k\2),polcoeff(p2,k)==0),p+=x^k;p2+=x^k*p));
      r=vector(subst(p,x,1));for(k=0,n,if(polcoeff(p,k),r[j++]=k));r}

Formula

n is in the sequence if and only if n = 0 or A000265(n) == 1 (mod 6). [Clarified by Peter Munn, Jun 11 2021]
n is in the sequence if n = 0 or b(n) is nonzero where b = A113448, A115235, or A123863. - Michael Somos, Jul 29 2015