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.

A038461 Sums of 10 distinct powers of 2.

Original entry on oeis.org

1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 2046, 2559, 2815, 2943, 3007, 3039, 3055, 3063, 3067, 3069, 3070, 3327, 3455, 3519, 3551, 3567, 3575, 3579, 3581, 3582, 3711, 3775, 3807, 3823, 3831, 3835, 3837, 3838, 3903
Offset: 1

Views

Author

Keywords

Crossrefs

Base 2 interpretation of A038452.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (Hamming weight = 1, 2, ..., 9).

Programs

  • Mathematica
    Select[Range[4000], DigitCount[#, 2, 1] == 10 &] (* Amiram Eldar, Feb 14 2022 *)
  • PARI
    isok(n) = hammingweight(n) == 10; \\ Michel Marcus, Feb 29 2016
    
  • Python
    from itertools import islice
    def A038461_gen(): # generator of terms
        yield (n:=1023)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A038461_list = list(islice(A038461_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

Sum_{n>=1} 1/a(n) = 1.386312271262110321181505974797071257205562524228381227122302929089588534920... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016