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.

A212314 Numbers m such that B(m^3) = 3*B(m), where B(m) is the binary weight of m (A000120).

Original entry on oeis.org

0, 5, 9, 10, 17, 18, 20, 33, 34, 36, 39, 40, 49, 65, 66, 68, 69, 72, 78, 80, 98, 105, 129, 130, 132, 135, 136, 138, 144, 156, 160, 169, 196, 199, 209, 210, 229, 257, 258, 260, 263, 264, 270, 272, 276, 277, 288, 291, 297, 312, 313, 320, 338, 359, 365, 392, 395, 398, 418
Offset: 1

Views

Author

Alex Ratushnyak, Oct 24 2013

Keywords

Comments

2*k is a term if and only if k is a term. - Robert Israel, Nov 06 2022

Crossrefs

Programs

  • Maple
    select(n -> convert(convert(n^3,base,2),`+`) = 3*convert(convert(n,base,2),`+`), [$0..1000]); # Robert Israel, Nov 06 2022
  • PARI
    isok(m) = hammingweight(m^3) == 3*hammingweight(m); \\ Michel Marcus, Nov 06 2022
  • Python
    import math
    for n in range(10000):
        c1 = c2 = 0
        t = n
        while t:
            c1+=t&1
            t>>=1
        t = n*n*n
        while t:
            c2+=t&1
            t>>=1
        if c1*3==c2: print(str(n), end=',')
    
  • Sage
    s = lambda n: sum((n^3).digits(2)) - 3*sum(n.digits(2))
    [n for n in (0..418) if s(n)==0]  # Peter Luschny, Oct 24 2013
    

Formula

A000120(a(n)^3) = A000120(a(n)) * 3.

A138597 Odd numbers k such that Hamming weight of k equals Hamming weight of k^3.

Original entry on oeis.org

1, 56953, 1830651, 5502457, 130002327, 2941876987, 3479043677, 3674103727, 10601496029, 12739098539, 29928193915, 93415397243, 111392161401, 532403822507, 893286088059, 1039374483323
Offset: 1

Views

Author

Martin Raab, May 13 2008

Keywords

Comments

This sequence is A118655 without the trivial examples k*2^n.
a(17) > 2^40. - Donovan Johnson, May 05 2012

Crossrefs

Cf. A363799 (Hamming weight(k) > Hamming weight(k^3)).

Programs

  • PARI
    isok(k) = (k%2) && (hammingweight(k) == hammingweight(k^3)); \\ Michel Marcus, Jul 31 2023

Formula

A000120(a(n)) = A000120(a(n)^3) with a(n) odd

Extensions

a(14)-a(16) from Donovan Johnson, May 05 2012

A212315 Numbers m such that B(m) = B(triangular(m)), where B(m) is the binary weight of m (A000120).

Original entry on oeis.org

0, 1, 3, 7, 15, 31, 39, 45, 63, 78, 79, 91, 93, 127, 139, 143, 158, 159, 175, 182, 187, 189, 222, 255, 286, 287, 318, 319, 351, 367, 375, 379, 381, 407, 446, 487, 511, 535, 543, 572, 574, 575, 607, 627, 638, 639, 703, 724, 727, 731, 747, 750, 759, 763, 765, 799, 823, 830
Offset: 1

Views

Author

Alex Ratushnyak, Oct 24 2013

Keywords

Crossrefs

Programs

  • Python
    def isa(n): return n.bit_count()==((n*(n+1))>>1).bit_count()
    print(list(n for n in range(10**3) if isa(n)))  # Dumitru Damian, Mar 04 2023

Formula

A000120(a(n)) = A000120(a(n)*(a(n)+1)/2).
Showing 1-3 of 3 results.