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.
%I A260488 #38 Nov 15 2023 18:39:15 %S A260488 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, %T A260488 64,67,73,74,76,79,85,86,91,97,98,100,103,104,109,110,112,115,121,122, %U A260488 124,127,128,133,134,139,145,146,148,151,152,157 %N A260488 Numbers of the form 2^m * (6k + 1) for m, k >= 0, and 0. %C A260488 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. %C A260488 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. %C A260488 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. %C A260488 It follows that: %C A260488 * No member of this sequence except 0 is a multiple of 3. %C A260488 * The sequence has a density of 1/3. %C A260488 * 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. %C A260488 * The sequence is closed under multiplication. %C A260488 * The primes in the sequence are A045375. %H A260488 Franklin T. Adams-Watters, <a href="/A260488/b260488.txt">Table of n, a(n) for n = 0..10000</a> %F A260488 n is in the sequence if and only if n = 0 or A000265(n) == 1 (mod 6). [Clarified by _Peter Munn_, Jun 11 2021] %F A260488 n is in the sequence if n = 0 or b(n) is nonzero where b = A113448, A115235, or A123863. - _Michael Somos_, Jul 29 2015 %e A260488 Using the alternate definition: %e A260488 1 is in the sequence because it is not the sum of 2 elements from {0}. %e A260488 2 is in the sequence because 2 = 2*1, and 1 is in the sequence. %e A260488 3 is not in the sequence because 3 = 1 + 2, and 1 and 2 are in the sequence. %e A260488 6 is not in the sequence because 6 = 2*3, and 3 is not in the sequence. %p A260488 N:= 1000: # to get all terms <= N %p A260488 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 %t A260488 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 *) %o A260488 (PARI) alist(n) = my(r=vector(n),j,k);r[1]=0;j=1;while(j<n,k++;if(k\2^valuation(k,2)%6==1,r[j++]=k));r %o A260488 (PARI) alim(n)={my(p=1,p2=p,r,j); %o A260488 for(k=1,n, %o A260488 if(if(k%2==0, polcoeff(p,k\2),polcoeff(p2,k)==0),p+=x^k;p2+=x^k*p)); %o A260488 r=vector(subst(p,x,1));for(k=0,n,if(polcoeff(p,k),r[j++]=k));r} %Y A260488 Cf. A126684, A260489, primes A045375, A000265. %Y A260488 Cf. A113448, A115235, A123863. %K A260488 nonn,nice %O A260488 0,3 %A A260488 _Franklin T. Adams-Watters_, Jul 27 2015