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

A159918 Number of ones in binary representation of n^2.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 3, 1, 3, 3, 5, 2, 4, 3, 4, 1, 3, 3, 5, 3, 6, 5, 3, 2, 5, 4, 6, 3, 5, 4, 5, 1, 3, 3, 5, 3, 6, 5, 7, 3, 5, 6, 7, 5, 8, 3, 4, 2, 5, 5, 5, 4, 8, 6, 7, 3, 6, 5, 7, 4, 6, 5, 6, 1, 3, 3, 5, 3, 6, 5, 7, 3, 6, 6, 9, 5, 7, 7, 5, 3, 6, 5, 8, 6, 7, 7, 7, 5, 9, 8, 5, 3, 6, 4, 5, 2, 5, 5, 6, 5, 9, 5, 7, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 25 2009

Keywords

Comments

The binary weight (A000120) of n^2.
a(n) = 0 iff n = 0. a(n) = 1 iff n = 2^k for some k >= 0. a(n) = 2 iff n = 3*2^k for some k >= 0. Szalay proves that a(n) = 3 iff n = 7*2^k, 23*2^k, or 2^a + 2^b for k >= 0 and a > b >= 0. It seems that a(n) = 4 iff n = 13*2^k, 15*2^k, 47*2^k, or 111*2^k but this has not been proven! Any other n with a(n) = 4 are greater than 10^50, and there are finitely many odd solutions. - Charles R Greathouse IV, Jan 20 2022

References

  • L. Szalay, The equations 2^n ± 2^m ± 2^l = z^2, Indagationes Mathematicae (N.S.) 13, no. 1 (2002), pp. 131-142.

Crossrefs

Programs

Formula

a(n) = A000120(A000290(n)); a(A077436(n)) = A000120(A077436(n)).
Lindström shows that lim sup wt(m^2)/log_2 m = 2. - N. J. A. Sloane, Oct 11 2013
a(n) = [x^(n^2)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018

A286375 a(n) = A278222(n^3).

Original entry on oeis.org

1, 2, 2, 36, 2, 96, 36, 840, 2, 1260, 96, 1260, 36, 2310, 840, 5040, 2, 1260, 1260, 69300, 96, 4620, 1260, 4320, 36, 1680, 2310, 12600, 840, 36960, 5040, 30240, 2, 1260, 1260, 831600, 1260, 415800, 69300, 2646000, 96, 27720, 4620, 900900, 1260, 221760, 4320, 277200, 36, 83160, 1680, 13860, 2310, 180180, 12600, 166320, 840, 15315300, 36960, 13860, 5040
Offset: 0

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Cf. A192085 (one of the matched sequences).

Programs

Formula

a(n) = A278222(A000578(n)) = A278222(n^3).

A363799 Numbers whose binary representation has more 1-bits than its cube.

Original entry on oeis.org

407182835067, 445317119867, 478351981947, 814365670134, 873268508637, 890634239734, 956703963894, 956703964539, 1628731340268, 1746537017274, 1781268479468, 1913407927788, 1913407929078, 2774213097787, 3257462680536, 3493074034548, 3562536958936, 3573277243773
Offset: 1

Views

Author

Zhao Hui Du, Jun 23 2023

Keywords

Comments

a(n) must have more 1-bits than a(n)^3 when they are written in binary.

Examples

			407182835067 is a term because A000120(407182835067) = 29, while A192085(407182835067) = A000120(407182835067^3) = 28.
		

Crossrefs

Cf. A000120, A192085, A138597 (equality).
Cf. A094694 (for squares).

Programs

  • PARI
    isok(k) = hammingweight(k) > hammingweight(k^3); \\ Michel Marcus, Aug 07 2023

Extensions

a(9)-a(18) from Martin Ehrenstein, Jul 31 2023

A192086 Numbers n such that the binary weight (A000120) of n^3 is less than the binary weight of n^2.

Original entry on oeis.org

219, 309, 349, 438, 467, 565, 618, 665, 698, 701, 817, 876, 885, 934, 1130, 1141, 1143, 1236, 1291, 1297, 1299, 1330, 1396, 1397, 1402, 1435, 1629, 1634, 1659, 1752, 1755, 1770, 1771, 1773, 1868, 1905, 2155, 2229, 2260, 2282, 2286, 2353, 2401, 2472, 2582
Offset: 1

Views

Author

Carl R. White, Jun 23 2011

Keywords

Comments

Numbers n such that A192085(n) < A159918(n).
This sequence is infinite, since if k is in the sequence then so is 2k. - Charles R Greathouse IV, Sep 27 2016

Examples

			219^2 decimal = 1011101101011001 binary, and 219^3 decimal = 101000000100010100100011; Since the cube has fewer ones in its binary expansion than the square (eight versus ten), 219 is in the list.
		

Crossrefs

Programs

  • Magma
    [ n: n in [0..2600] | &+Intseq(n^3,2) lt &+Intseq(n^2,2) ];  // Bruno Berselli, Jun 24 2011
    
  • Maple
    A192086 := proc(n) return `if`(add(b,b=convert(n^3,base,2))A192086(n),n=0..3000); # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    Select[Range[2800],DigitCount[#^3,2,1]Harvey P. Dale, Jun 30 2011 *)
    Flatten@Position[Flatten@(Differences@DigitSum[#^2*{1, #}, 2] & /@Range@15000), ?(# < 0 &)] (* _Hans Rudolf Widmer, Aug 05 2024 *)
  • PARI
    is(n)=hammingweight(n^3)Charles R Greathouse IV, Sep 27 2016

A234218 Primes whose cubes are odious.

Original entry on oeis.org

2, 13, 23, 29, 43, 59, 61, 67, 71, 73, 79, 89, 97, 101, 103, 109, 113, 131, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 229, 241, 251, 293, 311, 313, 337, 353, 367, 383, 389, 397, 409, 419, 431, 439, 443, 461, 467, 479, 499, 509, 521, 541, 563, 577, 601
Offset: 1

Views

Author

Irina Gerasimova, Dec 21 2013

Keywords

Comments

Primes p with odious p^3.
Note: "odious" means having an odd number of 1-bits in number's binary representation. So, put in another way, primes p such that A010060(A000578(p)) = 1. - Antti Karttunen, Dec 22 2013
Subsequence of the numbers 1, 2, 4, 8, 13, 16, 23, 25, 26, 29, 32, 35, 43, 45, 46, ... which have odious cubes.

Examples

			Prime 2 is in this sequence because 2^3 = 8 and 8 is odious number. Prime 13 is in this sequence because 13*3 = 2197 and 2197 is odious number.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000]], OddQ[DigitCount[#^3, 2, 1]] &] (* Indranil Ghosh, Apr 02 2017 *)
  • PARI
    is(n)=isprime(n) && hammingweight(n^3)%2 \\ Charles R Greathouse IV, Mar 17 2014

Extensions

Missing terms added by Antti Karttunen, Dec 22 2013

A320394 Number of ones in binary expansion n^5.

Original entry on oeis.org

0, 1, 1, 6, 1, 6, 6, 7, 1, 9, 6, 10, 6, 11, 7, 12, 1, 10, 9, 9, 6, 11, 10, 14, 6, 11, 11, 15, 7, 15, 12, 15, 1, 10, 10, 13, 9, 11, 9, 13, 6, 16, 11, 15, 10, 21, 14, 18, 6, 15, 11, 13, 11, 13, 15, 19, 7, 17, 15, 14, 12, 14, 15, 18, 1, 10, 10, 14, 10, 18, 13, 18
Offset: 0

Views

Author

Vincenzo Librandi, Nov 28 2018

Keywords

Comments

The binary weight of n^5.

Crossrefs

Programs

  • Magma
    [&+Intseq(n^5, 2): n in [0..79]];
    
  • Mathematica
    Table[DigitCount[n^5, 2][[1]], {n, 0, 100}]
  • PARI
    a(n) = hammingweight(n^5); \\ Michel Marcus, Nov 28 2018

Formula

a(n) = A000120(A000584(n)).

A364785 Primes whose binary representation has more 1-bits than its cube.

Original entry on oeis.org

445317119867, 28498383073019, 114304774692347, 7594322375176157
Offset: 1

Views

Author

Martin Ehrenstein, Aug 07 2023

Keywords

Examples

			445317119867 is a term because it is a prime number and A000120(445317119867) = 31, while A192085(445317119867) = A000120(445317119867^3) = 30.
		

Crossrefs

Intersection of A363799 and A000040.
Showing 1-7 of 7 results.