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-3 of 3 results.

A055938 Integers not generated by b(n) = b(floor(n/2)) + n (complement of A005187).

Original entry on oeis.org

2, 5, 6, 9, 12, 13, 14, 17, 20, 21, 24, 27, 28, 29, 30, 33, 36, 37, 40, 43, 44, 45, 48, 51, 52, 55, 58, 59, 60, 61, 62, 65, 68, 69, 72, 75, 76, 77, 80, 83, 84, 87, 90, 91, 92, 93, 96, 99, 100, 103, 106, 107, 108, 111, 114, 115, 118, 121, 122, 123, 124, 125, 126, 129
Offset: 1

Views

Author

Alford Arnold, Jul 21 2000

Keywords

Comments

Note that the lengths of the consecutive runs in a(n) form sequence A001511.
Integers that are not a sum of distinct integers of the form 2^k-1. - Vladeta Jovovic, Jan 24 2003
Also n! never ends in this many 0's in base 2 - Carl R. White, Jan 21 2008
A079559(a(n)) = 0. - Reinhard Zumkeller, Mar 18 2009
These numbers are dead-end points when trying to apply the iterated process depicted in A071542 in reverse, i.e. these are positive integers i such that there does not exist k with A000120(i+k)=k. See also comments at A179016. - Antti Karttunen, Oct 26 2012
Conjecture: a(n)=b(n) defined as b(1)=2, for n>1, b(n+1)=b(n)+1 if n is already in the sequence, b(n+1)=b(n)+3 otherwise. If so, then see Cloitre comment in A080578. - Ralf Stephan, Dec 27 2013
Numbers n for which A257265(m) = 0. - Reinhard Zumkeller, May 06 2015. Typo corrected by Antti Karttunen, Aug 08 2015
Numbers which have a 2 in their skew-binary representation (cf. A169683). - Allan C. Wechsler, Feb 28 2025

Examples

			Since A005187 begins 0 1 3 4 7 8 10 11 15 16 18 19 22 23 25 26 31... this sequence begins 2 5 6 9 12 13 14 17 20 21
		

Crossrefs

Complement of A005187. Setwise difference of A213713 and A213717.
Row 1 of arrays A257264, A256997 and also of A255557 (when prepended with 1). Equally: column 1 of A256995 and A255555.
Cf. also arrays A254105, A254107 and permutations A233276, A233278.
Left inverses: A234017, A256992.
Gives positions of zeros in A213714, A213723, A213724, A213731, A257265, positions of ones in A213725-A213727 and A256989, positions of nonzeros in A254110.
Cf. also A010061 (integers that are not a sum of distinct integers of the form 2^k+1).
Analogous sequence for factorial base number system: A219658, for Fibonacci number system: A219638, for base-3: A096346. Cf. also A136767-A136774.

Programs

  • Haskell
    a055938 n = a055938_list !! (n-1)
    a055938_list = concat $
       zipWith (\u v -> [u+1..v-1]) a005187_list $ tail a005187_list
    -- Reinhard Zumkeller, Nov 07 2011
    
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_Integer] := a[Floor[n/2]] + n; b = {}; Do[ b = Append[b, a[n]], {n, 0, 105}]; c =Table[n, {n, 0, 200}]; Complement[c, b]
    (* Second program: *)
    t = Table[IntegerExponent[(2n)!, 2], {n, 0, 100}]; Complement[Range[t // Last], t] (* Jean-François Alcover, Nov 15 2016 *)
  • PARI
    L=listcreate();for(n=1,1000,for(k=2*n-hammingweight(n)+1,2*n+1-hammingweight(n+1),listput(L,k)));Vec(L) \\ Ralf Stephan, Dec 27 2013
    
  • Python
    def a053644(n): return 0 if n==0 else 2**(len(bin(n)[2:]) - 1)
    def a043545(n):
        x=bin(n)[2:]
        return int(max(x)) - int(min(x))
    def a079559(n): return 1 if n==0 else a043545(n + 1)*a079559(n + 1 - a053644(n + 1))
    print([n for n in range(1, 201) if a079559(n)==0]) # Indranil Ghosh, Jun 11 2017, after the comment by Reinhard Zumkeller
  • Scheme
    ;; utilizing COMPLEMENT-macro from Antti Karttunen's IntSeq-library)
    (define A055938 (COMPLEMENT 1 A005187))
    ;; Antti Karttunen, Aug 08 2015
    

Formula

a(n) = A080578(n+1) - 2 = A080468(n+1) + 2*n (conjectured). - Ralf Stephan, Dec 27 2013
From Antti Karttunen, Aug 08 2015: (Start)
Other identities. For all n >= 1:
A234017(a(n)) = n.
A256992(a(n)) = n.
A257126(n) = a(n) - A005187(n).
(End)

Extensions

More terms from Robert G. Wilson v, Jul 24 2000

A096346 Complement of A004128.

Original entry on oeis.org

3, 7, 11, 12, 16, 20, 24, 25, 29, 33, 37, 38, 39, 43, 47, 51, 52, 56, 60, 64, 65, 69, 73, 77, 78, 79, 83, 87, 91, 92, 96, 100, 104, 105, 109, 113, 117, 118, 119, 120, 124, 128, 132, 133, 137, 141, 145, 146, 150, 154, 158, 159, 160, 164, 168, 172, 173, 177, 181, 185
Offset: 0

Views

Author

Alford Arnold, Aug 04 2004

Keywords

Comments

Shape sequence for A055938 is A001511; shape sequence for a(n) is A051064; A001511, A051064 and A055457 are p-adic valuations for p = 2, 3 & 5.
Also n! never ends in this many 0's in bases 3 and 6. - Carl R. White, Jan 21 2008

Examples

			A004128 begins 0 1 2 4 5 6 8 9 10 13 14 15 ... therefore a(n) begins 3 7 11 12 16 20 24 25 ...
		

Crossrefs

Programs

Extensions

More terms from Emeric Deutsch, Dec 09 2004

A120738 a(n) = 4*n - A000120(n).

Original entry on oeis.org

0, 3, 7, 10, 15, 18, 22, 25, 31, 34, 38, 41, 46, 49, 53, 56, 63, 66, 70, 73, 78, 81, 85, 88, 94, 97, 101, 104, 109, 112, 116, 119, 127, 130, 134, 137, 142, 145, 149, 152, 158, 161, 165, 168, 173, 176, 180, 183, 190, 193, 197, 200, 205, 208, 212, 215, 221, 224, 228
Offset: 0

Views

Author

Paul Barry, Jun 29 2006

Keywords

Comments

Partial sums of A090739.
a(n) is also the increasing sequence of exponents of x in Product_{k > 1} (1 + x^(2^k - 1)). - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
Related to partial sums of the Ruler sequence A001511 by a(n) = A005187(2n), therefore {a(n)+1} are the indices of 1's in A252488. - M. F. Hasler, Jan 22 2015

Crossrefs

Programs

  • Magma
    A120738:= func< n | 4*n-(&+Intseq(n, 2)) >;
    [A120738(n): n in [0..100]]; // G. C. Greubel, Oct 20 2024
  • Maple
    a:=n->simplify(log[2](16^n/(add(modp(binomial(n,k),2),k=0..n))));
    a:=n->simplify(log[2](16^n/(2^(n-(padic[ordp](n!,2)))))); # Note: n-(padic[ordp](n!,2)) is the number of 1's in the binary expansion of n. - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
  • Mathematica
    Table[4 n - DigitCount[n, 2, 1], {n, 0, 58}] (* Michael De Vlieger, Nov 06 2016 *)
  • PARI
    {a(n) = if( n < 0, 0, 4*n - subst( Pol( binary( n ) ), x, 1) ) } /* Michael Somos, Aug 28 2007 */
    
  • PARI
    a(n) = 4*n - hammingweight(n); \\ Michel Marcus, Nov 06 2016
    
  • Python
    # Python 3.10
    def A120738(n): return (n<<2)-n.bit_count() # Chai Wah Wu, Jul 12 2022
    
  • Sage
    A120738 = lambda n: 4*n - sum(n.digits(2))
    print([A120738(n) for n in (0..58)]) # Peter Luschny, Nov 06 2016
    

Formula

a(n) = log_2(16^n/A001316(n)). [This was the original definition.]
a(n) = 2n + A005187(n).
a(n) = 3n + A011371(n).
a(n) = 4n - log_2(A001316(n)).
a(n) = log_2(A061549(n)).
2^a(n) = 16^n/A001316(n) = A061549(n).
a(n) = A086343(n) + A001511(n) for n>0. - Alford Arnold, Mar 23 2009
2^a(n) = abs(A067624(n)/A117972(n)). - Johannes W. Meijer, Jul 06 2009
a(n) = Sum_{k>=0} (A030308(n,k)*A000225(k+2)). - Philippe Deléham, Oct 16 2011
a(n) = A005187(2n). - M. F. Hasler, Jan 22 2015

Extensions

Definition simplified by M. F. Hasler, Dec 29 2012
Showing 1-3 of 3 results.