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-10 of 22 results. Next

A061398 Number of squarefree integers between prime(n) and prime(n+1).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Examples

			Between 113 and 127 the 6 squarefree numbers are 114, 115, 118, 119, 122, 123, so a(30)=6.
From _Gus Wiseman_, Nov 06 2024: (Start)
The a(n) squarefree numbers for n = 1..16:
  1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16
  ---------------------------------------------------------------
  .   .   6   10  .   14  .   21  26  30  33  38  42  46  51  55
                      15      22          34  39              57
                                          35                  58
(End)
		

Crossrefs

Cf. A179211. [Reinhard Zumkeller, Jul 05 2010]
Counting all composite numbers (not just squarefree) gives A046933.
The version for nonsquarefree numbers is A061399.
Zeros are A068360.
The version for prime-powers is A080101.
Partial sums are A337030.
The version for non-prime-powers is A368748.
Excluding prime(n+1) from the range gives A373198.
Ones are A377430.
Positives are A377431.
The version for perfect-powers is A377432.
The version for non-perfect-powers is A377433 + 2.
For squarefree numbers (A005117) between primes:
- length is A061398 (this sequence)
- min is A112926
- max is A112925
- sum is A373197
For squarefree numbers between powers of two:
- length is A077643 (except initial terms), partial sums A143658
- min is A372683, difference A373125, indices A372540, firsts of A372475
- max is A372889, difference A373126
- sum is A373123
For primes between powers of two:
- length is A036378
- min is A104080 or A014210, indices A372684 (firsts of A035100)
- max is A014234, difference A013603
- sum is A293697 (except initial terms)

Programs

  • Maple
    p:= 2:
    for n from 1 to 200 do
      q:= nextprime(p);
    A[n]:= nops(select(numtheory:-issqrfree, [$p+1..q-1]));
    p:= q;
    od:
    seq(A[i],i=1..200); # Robert Israel, Jan 06 2017
  • Mathematica
    a[n_] := Count[Range[Prime[n]+1, Prime[n+1]-1], _?SquareFreeQ];
    Array[a, 100] (* Jean-François Alcover, Feb 28 2019 *)
    Count[Range[#[[1]]+1,#[[2]]-1],?(SquareFreeQ[#]&)]&/@Partition[ Prime[ Range[120]],2,1] (* _Harvey P. Dale, Oct 14 2021 *)
  • PARI
    { n=0; q=2; forprime (p=3, prime(1001), a=0; for (i=q+1, p-1, a+=issquarefree(i)); write("b061398.txt", n++, " ", a); q=p ) } \\ Harry J. Smith, Jul 22 2009
    
  • PARI
    a(n) = my(pp=prime(n)+1); sum(k=pp, nextprime(pp)-1, issquarefree(k)); \\ Michel Marcus, Feb 28 2019
    
  • Python
    from math import isqrt
    from sympy import mobius, prime, nextprime
    def A061398(n):
        p = prime(n)
        q = nextprime(p)
        r = isqrt(p-1)+1
        return sum(mobius(k)*((q-1)//k**2) for k in range(r,isqrt(q-1)+1))+sum(mobius(k)*((q-1)//k**2-(p-1)//k**2) for k in range(1,r))-1 # Chai Wah Wu, Jun 01 2024

Formula

a(n) = A013928(A000040(n+1)) - A013928(A000040(n)) - 1. - Robert Israel, Jan 06 2017
a(n) = A373198(n) - 1. - Gus Wiseman, Nov 06 2024

A061399 Number of nonsquarefree integers between primes prime(n) and prime(n+1).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Examples

			Between 113 and 127 the 7 numbers which are not squarefree are {116,117,120,121,124,125,126}, so a(30)=7.
From _Gus Wiseman_, Dec 07 2024: (Start)
The a(n) nonsquarefree numbers for n = 1..15:
   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
  ----------------------------------------------------------
   .   4   .   8  12  16  18  20  24   .  32  40   .  44  48
               9                  25      36          45  49
                                  27                      50
                                  28                      52
(End)
		

Crossrefs

Zeros are A068361.
First differences of A378086, restriction of A057627 to the primes.
Other classes (instead of nonsquarefree):
- For composite we have A046933, first differences of A065890.
- For squarefree see A061398, A068360, A071403, A373197, A373198, A377431.
- For prime power we have A080101.
- For non prime power we have A368748, see A378616.
- For perfect power we have A377432, zeros A377436.
- For non perfect power we have A377433, A029707.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A120327 gives the least nonsquarefree number >= n.

Programs

A373198 Number of squarefree numbers from prime(n) to prime(n+1) - 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 29 2024

Keywords

Examples

			This is the sequence of row-lengths of A005117 treated as a triangle with row-sums A373197:
   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
		

Crossrefs

Counting all numbers (not just squarefree) gives A001223, sum A371201.
For composite instead of squarefree we have A046933.
For squarefree numbers (A005117) between primes:
- sum is A373197
- length is A373198 (this sequence) = A061398 - 1
- min is A000040
- max is A112925, opposite A112926
For squarefree numbers between powers of two:
- sum is A373123
- length is A077643, partial sums A143658
- min is A372683, delta A373125, indices A372540, firsts of A372475
- max is A372889, delta A373126
For primes between powers of two:
- sum is A293697 (except initial terms)
- length is A036378
- min is A104080 or A014210, indices A372684 (firsts of A035100)
- max is A014234, delta A013603
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n],Prime[n+1]-1],SquareFreeQ]],{n,100}]
  • Python
    from math import isqrt
    from sympy import prime, nextprime, mobius
    def A373198(n):
        p = prime(n)
        q = nextprime(p)
        r = isqrt(p-1)+1
        return sum(mobius(k)*((q-1)//k**2) for k in range(r,isqrt(q-1)+1))+sum(mobius(k)*((q-1)//k**2-(p-1)//k**2) for k in range(1,r)) # Chai Wah Wu, Jun 01 2024

Formula

a(n) = A061398(n) + 1.

A077643 Number of squarefree integers in closed interval [2^n, -1 + 2*2^n], i.e., among 2^n consecutive numbers beginning with 2^n.

Original entry on oeis.org

1, 2, 3, 5, 9, 19, 39, 79, 157, 310, 621, 1246, 2491, 4980, 9958, 19924, 39844, 79672, 159365, 318736, 637457, 1274916, 2549816, 5099651, 10199363, 20398663, 40797299, 81594571, 163189087, 326378438, 652756861, 1305513511, 2611026987, 5222053970, 10444108084
Offset: 0

Views

Author

Labos Elemer, Nov 14 2002

Keywords

Comments

Number of squarefree numbers with binary expansion of length n, or with n bits. The sum of these numbers is given by A373123. - Gus Wiseman, Jun 02 2024

Examples

			For n=4: among the 16 numbers of {16, ..., 31}, nine are squarefree [17, 19, 21, 22, 23, 26, 29, 30, 31], so a(4) = 9.
		

Crossrefs

Partial sums (except first term) are A143658.
Run-lengths of A372475.
The minimum is A372683, delta A373125, indices A372540.
The maximum is A372889 (except at n=1), delta A373126, indices A143658.
Row-sums are A373123.
A005117 lists squarefree numbers, first differences A076259.
A053797 gives nonempty lengths of exclusive gaps between squarefree numbers.
A029837 counts bits, row-lengths of A030190 and A030308.
For primes between powers of 2:
- sum A293697
- length A036378 or A162145
- min A104080 or A014210, delta A092131, indices A372684
- max A014234, delta A013603, indices A007053
For squarefree numbers between primes:
- sum A373197
- length A373198 = A061398 - 1
- min A000040
- max A112925 (delta A240473), opposite A112926 (delta A240474)
Cf. A010036, A029931, A035100, A049093-A049096, A372473 (firsts of A372472), A372541 (firsts of A372433).

Programs

  • Mathematica
    Table[Apply[Plus, Table[Abs[MoebiusMu[2^w+j]], {j, 0, 2^w-1}]], {w, 0, 15}]
    (* second program *)
    Length/@Split[IntegerLength[Select[Range[10000],SquareFreeQ],2]]//Most (* Gus Wiseman, Jun 02 2024 *)
  • PARI
    { a(n) = sum(m=1,sqrtint(2^(n+1)-1), moebius(m) * ((2^(n+1)-1)\m^2 - (2^n-1)\m^2) ) } \\ Max Alekseyev, Oct 18 2008

Formula

a(n) = Sum_{j=0..-1+2^n} abs(mu(2^n + j)).
a(n)/2^n approaches 1/zeta(2), so limiting sequence is floor(2^n/zeta(2)), n >= 0. - Wouter Meeussen, May 25 2003

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 12 2003
More terms from Wouter Meeussen, May 25 2003
a(25)-a(32) from Max Alekseyev, Oct 18 2008
a(33)-a(34) from Amiram Eldar, Jul 17 2024

A071403 Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 20, 24, 27, 29, 31, 33, 37, 38, 42, 45, 46, 50, 52, 56, 61, 62, 64, 67, 68, 71, 78, 81, 84, 86, 92, 93, 96, 100, 103, 105, 109, 110, 117, 118, 121, 122, 130, 139, 141, 142, 145, 149, 150, 154, 158, 162, 166, 167, 170, 172, 174, 180
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Also the number of squarefree numbers <= prime(n). - Gus Wiseman, Dec 08 2024

Examples

			a(25)=61 because A005117(61) = prime(25) = 97.
From _Gus Wiseman_, Dec 08 2024: (Start)
The squarefree numbers up to prime(n) begin:
n = 1  2  3  4   5   6   7   8   9  10
    ----------------------------------
    2  3  5  7  11  13  17  19  23  29
    1  2  3  6  10  11  15  17  22  26
       1  2  5   7  10  14  15  21  23
          1  3   6   7  13  14  19  22
             2   5   6  11  13  17  21
             1   3   5  10  11  15  19
                 2   3   7  10  14  17
                 1   2   6   7  13  15
                     1   5   6  11  14
                         3   5  10  13
                         2   3   7  11
                         1   2   6  10
                             1   5   7
                                 3   6
                                 2   5
                                 1   3
                                     2
                                     1
The column-lengths are a(n).
(End)
		

Crossrefs

The strict version is A112929.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A070321 gives the greatest squarefree number up to n.
Other families: A014689, A027883, A378615, A065890.
Squarefree numbers between primes: A061398, A068360, A373197, A373198, A377430, A112925, A112926.
Nonsquarefree numbers: A057627, A378086, A061399, A068361, A120327, A377783, A378032, A378033.

Programs

  • Mathematica
    Position[Select[Range[300], SquareFreeQ], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Aug 17 2023 *)
  • PARI
    lista(nn)=sqfs = select(n->issquarefree(n), vector(nn, i, i)); for (i = 1, #sqfs, if (isprime(sqfs[i]), print1(i, ", "));); \\ Michel Marcus, Sep 11 2013
    
  • PARI
    a(n,p=prime(n))=sum(k=1, sqrtint(p), p\k^2*moebius(k)) \\ Charles R Greathouse IV, Sep 13 2013
    
  • PARI
    a(n,p=prime(n))=my(s); forfactored(k=1, sqrtint(p), s+=p\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Nov 27 2017
    
  • PARI
    first(n)=my(v=vector(n),pr,k); forsquarefree(m=1,n*logint(n,2)+3, k++; if(m[2][,2]==[1]~, v[pr++]=k; if(pr==n, return(v)))) \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A071403(n): return (p:=prime(n))+sum(mobius(k)*(p//k**2) for k in range(2,isqrt(p)+1)) # Chai Wah Wu, Jul 20 2024

Formula

A005117(a(n)) = A000040(n) = prime(n).
a(n) ~ (6/Pi^2) * n log n. - Charles R Greathouse IV, Nov 27 2017
a(n) = A013928(A008864(n)). - Ridouane Oudra, Oct 15 2019
From Gus Wiseman, Dec 08 2024: (Start)
a(n) = A112929(n) + 1.
a(n+1) - a(n) = A373198(n) = A061398(n) - 1.
(End)

A373127 Length of the n-th maximal antirun of squarefree numbers differing by more than one.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 4, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 5, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 4, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 2, 2, 1, 2, 1, 2, 4, 2, 1, 4, 1, 3, 2, 1, 2, 1, 2, 1, 2, 2, 1, 4, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 4, 1, 3, 4, 1, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The sum of this antirun is given by A373411.
An antirun of a sequence (in this case A005117) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row-lengths of:
   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
		

Crossrefs

Positions of first appearances are A373128, sorted A373200.
Functional neighbors: A007674, A027833 (partial sums A029707), A120992, A373403, A373408, A373409, A373411.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A077643 counts squarefree numbers with n bits, sum A373123.

Programs

  • Mathematica
    Length/@Split[Select[Range[100],SquareFreeQ],#1+1!=#2&]

A372683 Least squarefree number >= 2^n.

Original entry on oeis.org

1, 2, 5, 10, 17, 33, 65, 129, 257, 514, 1027, 2049, 4097, 8193, 16385, 32770, 65537, 131073, 262145, 524289, 1048577, 2097154, 4194305, 8388609, 16777217, 33554433, 67108865, 134217730, 268435457, 536870913, 1073741826, 2147483649, 4294967297, 8589934594
Offset: 0

Views

Author

Gus Wiseman, May 26 2024

Keywords

Examples

			The terms together with their binary expansions and binary indices begin:
       1:                    1 ~ {1}
       2:                   10 ~ {2}
       5:                  101 ~ {1,3}
      10:                 1010 ~ {2,4}
      17:                10001 ~ {1,5}
      33:               100001 ~ {1,6}
      65:              1000001 ~ {1,7}
     129:             10000001 ~ {1,8}
     257:            100000001 ~ {1,9}
     514:           1000000010 ~ {2,10}
    1027:          10000000011 ~ {1,2,11}
    2049:         100000000001 ~ {1,12}
    4097:        1000000000001 ~ {1,13}
    8193:       10000000000001 ~ {1,14}
   16385:      100000000000001 ~ {1,15}
   32770:     1000000000000010 ~ {2,16}
   65537:    10000000000000001 ~ {1,17}
  131073:   100000000000000001 ~ {1,18}
  262145:  1000000000000000001 ~ {1,19}
  524289: 10000000000000000001 ~ {1,20}
		

Crossrefs

For primes instead of powers of two we have A112926, opposite A112925, sum A373197, length A373198.
Counting zeros instead of all bits gives A372473, firsts of A372472.
These are squarefree numbers at indices A372540, firsts of A372475.
Counting ones instead of all bits gives A372541, firsts of A372433.
The opposite (greatest squarefree number <= 2^n) is A372889.
The difference from 2^n is A373125.
For prime instead of squarefree we have:
- bits A372684, firsts of A035100
- zeros A372474, firsts of A035103
- ones A372517, firsts of A014499
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A005117 lists squarefree numbers.
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.
A143658 counts squarefree numbers up to 2^n.

Programs

  • Mathematica
    Table[NestWhile[#+1&,2^n,!SquareFreeQ[#]&],{n,0,10}]
  • PARI
    a(n) = my(k=2^n); while (!issquarefree(k), k++); k; \\ Michel Marcus, May 29 2024
    
  • Python
    from itertools import count
    from sympy import factorint
    def A372683(n): return next(i for i in count(1<Chai Wah Wu, Aug 26 2024

Formula

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

A372684 Least k such that prime(k) >= 2^n.

Original entry on oeis.org

1, 3, 5, 7, 12, 19, 32, 55, 98, 173, 310, 565, 1029, 1901, 3513, 6543, 12252, 23001, 43391, 82026, 155612, 295948, 564164, 1077872, 2063690, 3957810, 7603554, 14630844, 28192751, 54400029, 105097566, 203280222, 393615807, 762939112, 1480206280, 2874398516, 5586502349
Offset: 1

Views

Author

Gus Wiseman, May 30 2024

Keywords

Examples

			The numbers prime(a(n)) together with their binary expansions and binary indices begin:
        2:                       10 ~ {2}
        5:                      101 ~ {1,3}
       11:                     1011 ~ {1,2,4}
       17:                    10001 ~ {1,5}
       37:                   100101 ~ {1,3,6}
       67:                  1000011 ~ {1,2,7}
      131:                 10000011 ~ {1,2,8}
      257:                100000001 ~ {1,9}
      521:               1000001001 ~ {1,4,10}
     1031:              10000000111 ~ {1,2,3,11}
     2053:             100000000101 ~ {1,3,12}
     4099:            1000000000011 ~ {1,2,13}
     8209:           10000000010001 ~ {1,5,14}
    16411:          100000000011011 ~ {1,2,4,5,15}
    32771:         1000000000000011 ~ {1,2,16}
    65537:        10000000000000001 ~ {1,17}
   131101:       100000000000011101 ~ {1,3,4,5,18}
   262147:      1000000000000000011 ~ {1,2,19}
   524309:     10000000000000010101 ~ {1,3,5,20}
  1048583:    100000000000000000111 ~ {1,2,3,21}
  2097169:   1000000000000000010001 ~ {1,5,22}
  4194319:  10000000000000000001111 ~ {1,2,3,4,23}
  8388617: 100000000000000000001001 ~ {1,4,24}
		

Crossrefs

The opposite (greatest k such that prime(k) <= 2^n) is A007053.
Positions of first appearances in A035100.
The distance from prime(a(n)) to 2^n is A092131.
Counting zeros instead of all bits gives A372474, firsts of A035103.
Counting ones instead of all bits gives A372517, firsts of A014499.
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
For squarefree numbers between primes:
- sum A373197
- length A373198 = A061398 - 1
- min A000040
- max A112925, opposite A112926

Programs

  • Mathematica
    Table[PrimePi[If[n==1,2,NextPrime[2^n]]],{n,30}]
  • PARI
    a(n) = primepi(nextprime(2^n)); \\ Michel Marcus, May 31 2024

Formula

a(n>1) = A007053(n) + 1.
a(n) = A000720(A104080(n)).
prime(a(n)) = A104080(n).
prime(a(n)) - 2^n = A092131(n).

Extensions

More terms from Michel Marcus, May 31 2024

A376305 Run-compression of the sequence of first differences of squarefree numbers.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 4, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 4, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3
Offset: 1

Views

Author

Gus Wiseman, Sep 20 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The sequence of squarefree numbers (A005117) is:
  1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, ...
The sequence of first differences (A076259) of squarefree numbers is:
  1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, ...
The run-compression is A376305 (this sequence).
		

Crossrefs

This is the run-compression of first differences of A005117.
For prime instead of squarefree numbers we have A037201, halved A373947.
Before compressing we had A076259, ones A375927.
For run-lengths instead of compression we have A376306.
For run-sums instead of compression we have A376307.
For prime-powers instead of squarefree numbers we have A376308.
For positions of first appearances instead of compression we have A376311.
The version for nonsquarefree numbers is A376312.
Positions of 1's are A376342.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, differences A057820.
A003242 counts compressed or anti-run compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259.
A013929 lists nonsquarefree numbers, differences A078147.
A116861 counts partitions by compressed sum, by compressed length A116608.
A274174 counts contiguous compositions, ranks A374249.

Programs

  • Mathematica
    First/@Split[Differences[Select[Range[100],SquareFreeQ]]]

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
Showing 1-10 of 22 results. Next