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

A378371 Distance between n and the least non prime power >= n, allowing 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 28 2024

Keywords

Comments

Non prime powers allowing 1 (A361102) are numbers that are not a prime power (A246655), namely 1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, ...

Examples

			The least non prime power >= 4 is 6, so a(4) = 2.
		

Crossrefs

Sequences obtained by adding n to each term are placed in parentheses below.
For prime we have A007920 (A151800), strict A013632.
For composite we have A010051 (A113646 except initial terms).
For perfect power we have A074984 (A377468)
For squarefree we have A081221 (A067535).
For nonsquarefree we have (A120327).
For non perfect power we have A378357 (A378358).
The opposite version is A378366 (A378367).
For prime power we have A378370, strict A377282 (A000015).
This sequence is A378371 (A378372).
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.

Programs

  • Mathematica
    Table[NestWhile[#+1&,n,PrimePowerQ[#]&]-n,{n,100}]

Formula

a(n) = A378372(n) - n.

A378372 Least non prime power >= n, allowing 1.

Original entry on oeis.org

1, 6, 6, 6, 6, 6, 10, 10, 10, 10, 12, 12, 14, 14, 15, 18, 18, 18, 20, 20, 21, 22, 24, 24, 26, 26, 28, 28, 30, 30, 33, 33, 33, 34, 35, 36, 38, 38, 39, 40, 42, 42, 44, 44, 45, 46, 48, 48, 50, 50, 51, 52, 54, 54, 55, 56, 57, 58, 60, 60, 62, 62, 63, 65, 65, 66, 68
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2024

Keywords

Comments

Non prime powers allowing 1 (A361102) are numbers that are not a prime power (A246655), namely 1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, ...

Examples

			The least non prime power >= 4 is 6, so a(4) = 6.
		

Crossrefs

Sequences obtained by subtracting n from each term are placed in parentheses below.
For prime power we have A000015 (A378370).
For squarefree we have A067535 (A081221).
For composite we have A113646 (A010051).
For nonsquarefree we have A120327.
For prime we have A151800 (A007920), strict (A013632).
Run-lengths are 1 and A375708.
For perfect power we have A377468 (A074984).
For non-perfect power we have A378358 (A378357).
The opposite is A378367, distance A378366.
This sequence is A378372 (A378371).
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.

Programs

  • Mathematica
    Table[NestWhile[#+1&,n,PrimePowerQ[#]&],{n,100}]

Formula

a(n) = A378371(n) + n.

A378367 Greatest non prime power <= n, allowing 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 6, 6, 6, 10, 10, 12, 12, 14, 15, 15, 15, 18, 18, 20, 21, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 30, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 48, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 63, 65, 66, 66
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2024

Keywords

Comments

Non prime powers allowing 1 (A361102) are numbers that are not a prime power (A246655), namely 1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, ...

Examples

			The greatest non prime power <= 7 is 6, so a(7) = 6.
		

Crossrefs

Sequences obtained by subtracting each term from n are placed in parentheses below.
For prime we have A007917 (A064722).
For nonprime we have A179278 (A010051 almost).
For perfect power we have A081676 (A069584).
For squarefree we have A070321.
For nonsquarefree we have A378033.
For non perfect power we have A378363.
The opposite is A378372, subtracting n A378371.
For prime power we have A031218 (A276781 - 1).
Subtracting from n gives (A378366).
A000015 gives the least prime power >= n (A378370).
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A151800 gives the least prime > n (A013632), weak version A007918 (A007920).
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.
Cf. A356068.

Programs

  • Mathematica
    Table[NestWhile[#-1&,n,PrimePowerQ[#]&],{n,100}]

Formula

a(n) = n - A378366(n).
a(n) = A361102(A356068(n)). - Ridouane Oudra, Aug 22 2025

A378457 Difference between n and the greatest prime power <= n, allowing 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 29 2024

Keywords

Comments

Prime powers allowing 1 are listed by A000961.

Examples

			The greatest prime power <= 6 is 5, so a(6) = 1.
		

Crossrefs

Sequences obtained by subtracting each term from n are placed in parentheses below.
For nonprime we have A010051 (almost) (A179278).
Subtracting from n gives (A031218).
For prime we have A064722 (A007917).
For perfect power we have A069584 (A081676).
For squarefree we have (A070321).
Adding one gives A276781.
For nonsquarefree we have (A378033).
For non perfect power we have (A378363).
For non prime power we have A378366 (A378367).
The opposite is A378370 = A377282-1.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A151800 gives the least prime > n, weak version A007918.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.

Programs

  • Mathematica
    Table[n-NestWhile[#-1&,n,#>1&&!PrimePowerQ[#]&],{n,100}]

Formula

a(n) = n - A031218(n).
a(n) = A276781(n) - 1.
Showing 1-4 of 4 results.