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.

Previous Showing 11-16 of 16 results.

A373125 Difference between 2^n and the least squarefree number >= 2^n.

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 3, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, May 28 2024

Keywords

Crossrefs

For prime instead of squarefree we have A092131, opposite A013603.
For primes instead of powers of 2: A240474, A240473, A112926, A112925.
Difference between 2^n and A372683(n).
The opposite is A373126, delta of A372889.
A005117 lists squarefree numbers, first differences A076259.
A053797 gives lengths of gaps between squarefree numbers.
A061398 counts squarefree numbers between primes (exclusive).
A070939 or (preferably) A029837 gives length of binary expansion.
A077643 counts squarefree terms between powers of 2, run-lengths of A372475.
A143658 counts squarefree numbers up to 2^n.
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).
For primes between powers of 2:
- sum A293697 (except initial terms)
- length A036378
- min A104080 or A014210, indices A372684 (firsts of A035100)
- max A014234, delta A013603

Programs

  • Mathematica
    Table[NestWhile[#+1&,2^n,!SquareFreeQ[#]&]-2^n,{n,0,100}]

Formula

a(n) = A372683(n)-2^n. - R. J. Mathar, May 31 2024

A373126 Difference between 2^n and the greatest squarefree number <= 2^n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 0

Views

Author

Gus Wiseman, May 29 2024

Keywords

Examples

			The greatest squarefree number <= 2^21 is 2097149, and 2^21 = 2097152, so a(21) = 3.
		

Crossrefs

For prime instead of squarefree we have A013603, opposite A092131.
For primes instead of powers of 2: A240474, A240473, A112926, A112925.
Difference between 2^n and A372889.
The opposite is A373125, delta of A372683.
A005117 lists squarefree numbers, first differences A076259.
A053797 gives lengths of gaps between squarefree numbers.
A061398 counts squarefree numbers between primes (exclusive).
A070939 or (preferably) A029837 gives length of binary expansion.
A077643 counts squarefree terms between powers of 2, run-lengths of A372475.
A143658 counts squarefree numbers up to 2^n.
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).
For primes between powers of 2:
- sum A293697 (except initial terms)
- length A036378
- min A104080 or A014210, indices A372684 (firsts of A035100)
- max A014234

Programs

  • Mathematica
    Table[2^n-NestWhile[#-1&,2^n,!SquareFreeQ[#]&],{n,0,100}]

Formula

a(n) = 2^n-A372889(n). - R. J. Mathar, May 31 2024

A372541 Least k such that the k-th squarefree number has exactly n ones in its binary expansion.

Original entry on oeis.org

1, 3, 6, 11, 20, 60, 78, 157, 314, 624, 1245, 3736, 4982, 9962, 19920, 39844, 79688, 239046, 318725, 956194, 1912371, 2549834, 5099650, 15298984, 20398664, 40797327, 81594626, 163189197, 326378284, 979135127, 1305513583, 2611027094, 5222054081, 10444108051
Offset: 0

Views

Author

Gus Wiseman, May 09 2024

Keywords

Examples

			The squarefree numbers A005117(a(n)) together with their binary expansions and binary indices begin:
       1:                   1 ~ {1}
       3:                  11 ~ {1,2}
       7:                 111 ~ {1,2,3}
      15:                1111 ~ {1,2,3,4}
      31:               11111 ~ {1,2,3,4,5}
      95:             1011111 ~ {1,2,3,4,5,7}
     127:             1111111 ~ {1,2,3,4,5,6,7}
     255:            11111111 ~ {1,2,3,4,5,6,7,8}
     511:           111111111 ~ {1,2,3,4,5,6,7,8,9}
    1023:          1111111111 ~ {1,2,3,4,5,6,7,8,9,10}
    2047:         11111111111 ~ {1,2,3,4,5,6,7,8,9,10,11}
    6143:       1011111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,13}
    8191:       1111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13}
   16383:      11111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14}
   32767:     111111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
   65535:    1111111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
  131071:   11111111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}
		

Crossrefs

Positions of firsts appearances in A372433.
Counting zeros instead of ones gives A372473, firsts in A372472.
For prime instead of squarefree we have A372517, firsts of A014499.
Counting bits (length) gives A372540, firsts of A372475, runs A077643.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A005117 lists squarefree numbers.
A030190 gives binary expansion, reversed A030308.
A048793 lists positions of ones in reversed binary expansion, sum A029931.
A145037, A097110 count ones minus zeros, for primes A372516, A177796.
A371571 lists positions of zeros in binary expansion, sum A359359.
A371572 lists positions of ones in binary expansion, sum A230877.
A372515 lists positions of zeros in reversed binary expansion, sum A359400.

Programs

  • Mathematica
    nn=10000;
    spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&];
    dcs=DigitCount[Select[Range[nn],SquareFreeQ],2,1];
    Table[Position[dcs,i][[1,1]],{i,spnm[dcs-1]}]
  • Python
    from math import isqrt
    from itertools import count
    from sympy import factorint, mobius
    from sympy.utilities.iterables import multiset_permutations
    def A372541(n):
        if n==0: return 1
        for l in count(n):
            m = 1<Chai Wah Wu, May 10 2024

Extensions

a(23)-a(33) from Chai Wah Wu, May 10 2024

A373123 Sum of all squarefree numbers from 2^(n-1) to 2^n - 1.

Original entry on oeis.org

1, 5, 18, 63, 218, 891, 3676, 15137, 60580, 238672, 953501, 3826167, 15308186, 61204878, 244709252, 979285522, 3917052950, 15664274802, 62663847447, 250662444349, 1002632090376, 4010544455838, 16042042419476, 64168305037147, 256675237863576
Offset: 1

Views

Author

Gus Wiseman, May 27 2024

Keywords

Examples

			This is the sequence of row sums of A005117 treated as a triangle with row-lengths A077643:
   1
   2   3
   5   6   7
  10  11  13  14  15
  17  19  21  22  23  26  29  30  31
  33  34  35  37  38  39  41  42  43  46  47  51  53  55  57  58  59  61  62
		

Crossrefs

Counting all numbers (not just squarefree) gives A010036.
For the sectioning of A005117:
Row-lengths are A077643, partial sums A143658.
First column is A372683, delta A373125, indices A372540, firsts of A372475.
Last column is A372889, delta A373126, indices A143658, diffs A077643.
For primes instead of powers of two:
- sum A373197
- length A373198 = A061398 - 1
- maxima A112925, opposite A112926
For prime instead of squarefree:
- sum A293697 (except initial terms)
- length A036378
- min A104080 or A014210, indices A372684 (firsts of A035100)
- max A014234, delta A013603
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A005117 lists squarefree numbers, first differences A076259.
A030190 gives binary expansion, reversed A030308.
A070939 or (preferably) A029837 gives length of binary expansion.
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).

Programs

  • Mathematica
    Table[Total[Select[Range[2^(n-1),2^n-1],SquareFreeQ]],{n,10}]
  • PARI
    a(n) = my(s=0); forsquarefree(i=2^(n-1), 2^n-1, s+=i[1]); s; \\ Michel Marcus, May 29 2024

A372889 Greatest squarefree number <= 2^n.

Original entry on oeis.org

1, 2, 3, 7, 15, 31, 62, 127, 255, 511, 1023, 2047, 4094, 8191, 16383, 32767, 65535, 131071, 262142, 524287, 1048574, 2097149, 4194303, 8388607, 16777214, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741822, 2147483647, 4294967295, 8589934591
Offset: 0

Views

Author

Gus Wiseman, May 27 2024

Keywords

Examples

			The terms together with their binary expansions and binary indices begin:
      1:               1 ~ {1}
      2:              10 ~ {2}
      3:              11 ~ {1,2}
      7:             111 ~ {1,2,3}
     15:            1111 ~ {1,2,3,4}
     31:           11111 ~ {1,2,3,4,5}
     62:          111110 ~ {2,3,4,5,6}
    127:         1111111 ~ {1,2,3,4,5,6,7}
    255:        11111111 ~ {1,2,3,4,5,6,7,8}
    511:       111111111 ~ {1,2,3,4,5,6,7,8,9}
   1023:      1111111111 ~ {1,2,3,4,5,6,7,8,9,10}
   2047:     11111111111 ~ {1,2,3,4,5,6,7,8,9,10,11}
   4094:    111111111110 ~ {2,3,4,5,6,7,8,9,10,11,12}
   8191:   1111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13}
  16383:  11111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14}
  32767: 111111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
		

Crossrefs

Positions of these terms in A005117 are A143658.
For prime instead of squarefree we have A014234, delta A013603.
For primes instead of powers of two we have A112925, opposite A112926.
Least squarefree number >= 2^n is A372683, delta A373125, indices A372540.
The opposite for prime instead of squarefree is A372684, firsts of A035100.
The delta (difference from 2^n) is A373126.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A005117 lists squarefree numbers, first differences A076259.
A030190 gives binary expansion, reversed A030308, length A070939 or A029837.
A061398 counts squarefree numbers between primes, exclusive.
A077643 counts squarefree terms between powers of 2, run-lengths of A372475.

Programs

  • Mathematica
    Table[NestWhile[#-1&,2^n,!SquareFreeQ[#]&],{n,0,15}]
  • PARI
    a(n) = my(k=2^n); while (!issquarefree(k), k--); k; \\ Michel Marcus, May 29 2024

Formula

a(n) = A005117(A143658(n)).
a(n) = A070321(2^n). - R. J. Mathar, May 31 2024

A373124 Sum of indices of primes between powers of 2.

Original entry on oeis.org

1, 2, 7, 11, 45, 105, 325, 989, 3268, 10125, 33017, 111435, 369576, 1277044, 4362878, 15233325, 53647473, 189461874, 676856245, 2422723580, 8743378141, 31684991912, 115347765988, 421763257890, 1548503690949, 5702720842940, 21074884894536, 78123777847065
Offset: 0

Views

Author

Gus Wiseman, May 31 2024

Keywords

Comments

Sum of k such that 2^n+1 <= prime(k) <= 2^(n+1).

Examples

			Row-sums of the sequence of all positive integers as a triangle with row-lengths A036378:
   1
   2
   3  4
   5  6
   7  8  9 10 11
  12 13 14 15 16 17 18
  19 20 21 22 23 24 25 26 27 28 29 30 31
  32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
		

Crossrefs

For indices of primes between powers of 2:
- sum A373124 (this sequence)
- length A036378
- min A372684 (except initial terms), delta A092131
- max A007053
For primes between powers of 2:
- sum A293697
- length A036378
- min A104080 or A014210
- max A014234, delta A013603
For squarefree numbers between powers of 2:
- sum A373123
- length A077643, run-lengths of A372475
- min A372683, delta A373125, indices A372540
- max A372889, delta A373126, indices A143658

Programs

  • Mathematica
    Table[Total[PrimePi/@Select[Range[2^(n-1)+1,2^n],PrimeQ]],{n,10}]
  • PARI
    ip(n) = primepi(1<A007053
    t(n) = n*(n+1)/2; \\ A000217
    a(n) = t(ip(n+1)) - t(ip(n)); \\ Michel Marcus, May 31 2024
Previous Showing 11-16 of 16 results.