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 21-30 of 51 results. Next

A075046 a(n) = the smallest number k such that the number of divisors of the n numbers from k through k+n-1 are in nondescending order.

Original entry on oeis.org

1, 1, 1, 1, 241, 241, 12853, 12853, 234613, 376741, 78312721, 125938261, 4019167441, 16586155153, 35237422882, 1296230533473, 42301168491121, 61118966262061
Offset: 1

Views

Author

Amarnath Murthy, Sep 03 2002

Keywords

Comments

tau(k) <= tau(k+1) <= ... <= tau(k+n-1).
a(16) > 10^12. - Donovan Johnson, Oct 13 2009
a(17) > 10^13. - Giovanni Resta, Apr 12 2017
a(19) > 2.64*10^15. - Jud McCranie, Mar 27 2019
If a(n) > 1, then A013632(a(n)) >= n. Might be useful to help speed up brute force search. - Chai Wah Wu, May 04 2017

Examples

			a(5) = 241 = a(6) as tau(241) = 2 < tau(242) = tau(243) = tau(244) = tau(245) = 6 < tau(246).
		

Crossrefs

Programs

  • Mathematica
    k = 1; Do[ While[t = Table[ DivisorSigma[0, i], {i, k, k + n - 1}]; t != Sort[t], k++ ]; Print[k], {n, 1, 11}]

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003
a(11) from Robert G. Wilson v, Sep 07 2003
a(12)-a(15) from Donovan Johnson, Oct 13 2009
a(16) from Fred Schneider, Mar 29 2017
a(17)-a(18) from Jud McCranie, Mar 27 2019

A378366 Difference between n and the greatest non prime power <= n (allowing 1).

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 0, 1, 0, 0, 1, 2, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 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 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, ...

Crossrefs

Sequences obtained by subtracting each term from n are placed in parentheses below.
For nonprime we almost have A010051 (A179278).
For prime we have A064722 (A007917).
For perfect power we have A069584 (A081676).
For squarefree we have (A070321).
For prime power we have A378457 = A276781-1 (A031218).
For nonsquarefree we have (A378033).
For non perfect power we almost have A075802 (A378363).
Subtracting from n gives (A378367).
The opposite is A378371, adding n A378372.
A000015 gives the least prime power >= n (cf. A378370 = A377282 - 1).
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,PrimePowerQ[#]&],{n,100}]

Formula

a(n) = n - A378367(n).

A013634 a(n) = nextprime(n) + n.

Original entry on oeis.org

2, 3, 5, 8, 9, 12, 13, 18, 19, 20, 21, 24, 25, 30, 31, 32, 33, 36, 37, 42, 43, 44, 45, 52, 53, 54, 55, 56, 57, 60, 61, 68, 69, 70, 71, 72, 73, 78, 79, 80, 81, 84, 85, 90, 91, 92, 93, 100, 101, 102, 103, 104, 105, 112, 113, 114, 115, 116, 117, 120, 121, 128, 129, 130
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [NextPrime(n) + n: n in [0..80]]; // Vincenzo Librandi, Dec 27 2018
  • Maple
    [ seq(nextprime(i)+i,i=0..100) ];
  • Mathematica
    Table[n+NextPrime[n],{n,0,120}] (* Harvey P. Dale, May 03 2013 *)
    Array[NextPrime[#] + # &, 80, 0] (* Vincenzo Librandi, Dec 27 2018 *)

Formula

a(n) = A151800(n) + n.

A060846 Smallest prime > the n-th nontrivial power of a prime.

Original entry on oeis.org

5, 11, 11, 17, 29, 29, 37, 53, 67, 83, 127, 127, 131, 173, 251, 257, 293, 347, 367, 521, 541, 631, 733, 853, 967, 1031, 1361, 1373, 1693, 1861, 2053, 2203, 2203, 2213, 2411, 2819, 3137, 3491, 3727, 4099, 4493, 4919, 5051, 5333, 6247, 6563, 6863, 6899, 7927
Offset: 1

Views

Author

Labos Elemer, May 03 2001

Keywords

Examples

			78125=5^7 is followed by 78137.
		

Crossrefs

Programs

  • Mathematica
    NextPrime[Select[Range[10^4], !PrimeQ[#] && PrimePowerQ[#] &]] (* Amiram Eldar, Oct 04 2024 *)
  • PARI
    ispp(x) = !isprime(x) && isprimepower(x);
    lista(nn) = apply(x->nextprime(x), select(x->ispp(x), [1..nn])); \\ Michel Marcus, Aug 24 2019
    
  • Python
    from sympy import primepi, integer_nthroot, nextprime
    def A060846(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        return nextprime(bisection(f,n,n)) # Chai Wah Wu, Sep 15 2024

Formula

a(n) = nextprime(A025475(n+1)) = A007918(A025475(n+1)) = Min{p| p>A025475(n+1)}. [corrected by Michel Marcus, Aug 24 2019]

A072918 a(n) = p(n) - sigma(n), where p(n) is the least prime greater than sigma(n).

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Aug 11 2002

Keywords

Examples

			phi(4) = 7 and the least prime > 7 is 11; hence a(4) = 11 - 7 = 4.
		

Crossrefs

Programs

  • Mathematica
    ps[n_]:=Module[{sn=DivisorSigma[1,n]}, NextPrime[sn]-sn]; ps/@Range[100] (* Harvey P. Dale, Feb 02 2011 *)
  • PARI
    A072918(n) = (nextprime(1+sigma(n)) - sigma(n)); \\ Antti Karttunen, Nov 07 2017

Formula

a(n) = A013632(A000203(n)). - Antti Karttunen, Nov 07 2017

A084695 Triangle read by rows in which row n lists the n smallest positive numbers k such that k + n is a prime.

Original entry on oeis.org

1, 1, 3, 2, 4, 8, 1, 3, 7, 9, 2, 6, 8, 12, 14, 1, 5, 7, 11, 13, 17, 4, 6, 10, 12, 16, 22, 24, 3, 5, 9, 11, 15, 21, 23, 29, 2, 4, 8, 10, 14, 20, 22, 28, 32, 1, 3, 7, 9, 13, 19, 21, 27, 31, 33, 2, 6, 8, 12, 18, 20, 26, 30, 32, 36, 42, 1, 5, 7, 11, 17, 19, 25, 29, 31, 35, 41, 47
Offset: 1

Views

Author

Amarnath Murthy and Jason Earls, Jul 12 2003

Keywords

Examples

			Triangle begins:
  1;
  1,  3;
  2,  4,  8;
  1,  3,  7,  9;
  2,  6,  8, 12, 14;
  1,  5,  7, 11, 13, 17;
  4,  6, 10, 12, 16, 22, 24;
		

Crossrefs

First column gives A013632, last gives A084747.

Programs

  • Magma
    [NthPrime(#PrimesUpTo(n) +k) -n: k in [1..n], n in [1..16]]; // G. C. Greubel, May 12 2023
    
  • Mathematica
    nn=30;Flatten[With[{prs=Prime[Range[nn]]},Table[Take[prs,{PrimePi[n]+1, PrimePi[n]+n}]-n,{n,Floor[nn/2]}]]] (* Harvey P. Dale, Dec 07 2012 *)
    Table[Prime[PrimePi[n] +k] -n, {n,16}, {k,n}]//Flatten (* G. C. Greubel, May 12 2023 *)
  • SageMath
    def A084695(n,k): return nth_prime(prime_pi(n) + k) - n
    flatten([[A084695(n,k) for k in range(1,n+1)] for n in range(1,17)]) # G. C. Greubel, May 12 2023

Formula

T(n, k) = prime(PrimePi(n) + k) - n. - G. C. Greubel, May 12 2023

A117217 Common prime gap associated with the primes A122535.

Original entry on oeis.org

2, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 12, 12, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 1

Views

Author

Lekraj Beedassy, Mar 04 2006

Keywords

Crossrefs

Cf. A006562, A013632, A122535. - Zak Seidov, Feb 12 2013

Formula

a(n)=A013632(A122535(n)). - R. J. Mathar, Apr 11 2008
a(n)=A006562(n)-A122535(n). - Zak Seidov, Feb 12 2013

Extensions

Corrected and extended by R. J. Mathar, Apr 11 2008

A159978 a(n) = (smallest prime > Fibonacci(n)) - Fibonacci(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 2, 3, 4, 8, 5, 6, 2, 3, 4, 4, 7, 20, 14, 3, 2, 4, 13, 4, 10, 11, 16, 14, 23, 4, 4, 25, 10, 14, 35, 6, 24, 3, 2, 6, 7, 12, 20, 9, 48, 10, 5, 28, 18, 23, 14, 14, 11, 16, 10, 21, 4, 62, 13, 38, 12, 7, 16, 12, 19, 36, 28, 143, 32, 58, 29, 96, 100, 33, 2, 30, 27, 12, 62, 25
Offset: 1

Views

Author

Enoch Haga, Apr 28 2009

Keywords

Examples

			a(6)=3 because the 6th Fibonacci term is 8 and the distance to nextprime(6) is 3 (11-8=3).
		

Crossrefs

Programs

  • Maple
    A159978 := proc(n) local f; f := combinat[fibonacci](n) ; nextprime(f)-f ; end: seq(A159978(n),n=1..100) ; # R. J. Mathar, Apr 29 2009
  • Mathematica
    Table[f = Fibonacci[n]; NextPrime[f] - f, {n, 200}] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2011 *)
  • PARI
    a(n) = my(f=fibonacci(n)); nextprime(f+1) - f; \\ Michel Marcus, Sep 22 2022
  • UBASIC
    10 'FiboB 20 A=1:print A; 30 B=1:print B; 40 C=A+B:print C;:T=T+1:print "<";nxtprm(C)-C;">"; 50 D=B+C:print D;:print "<";nxtprm(D)-D;">"; 60 A=C:B=D:if T>22 then stop:else 40
    

Formula

a(n) = A013632(A000045(n)). - R. J. Mathar, Apr 29 2009

Extensions

Extended by R. J. Mathar, Apr 29 2009

A171228 n^(p-n) where p is smallest prime > n.

Original entry on oeis.org

0, 1, 2, 9, 4, 25, 6, 2401, 512, 81, 10, 121, 12, 28561, 2744, 225, 16, 289, 18, 130321, 8000, 441, 22, 148035889, 7962624, 390625, 17576, 729, 28, 841, 30, 887503681, 33554432, 1185921, 39304, 1225, 36, 1874161, 54872, 1521, 40, 1681, 42, 3418801
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Dec 05 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n^(NextPrime[n]-n),{n,0,50}] (* Harvey P. Dale, Jun 20 2013 *)

Extensions

Definition corrected by Andrew Weimholt, Dec 08 2009

A353072 Numbers k such that nextprime(k)-k is a positive square.

Original entry on oeis.org

1, 2, 4, 6, 7, 10, 12, 13, 16, 18, 19, 22, 25, 28, 30, 33, 36, 37, 40, 42, 43, 46, 49, 52, 55, 58, 60, 63, 66, 67, 70, 72, 75, 78, 79, 82, 85, 88, 93, 96, 97, 100, 102, 103, 106, 108, 109, 112, 118, 123, 126, 127, 130, 133, 136, 138, 140, 145, 148, 150, 153
Offset: 1

Views

Author

Tanya Khovanova, Apr 21 2022

Keywords

Comments

Numbers p-1, where p is prime is a subsequence (see A006093).

Examples

			The next prime after 7 is 11, and 11-7 = 4 a square, so 7 is in this sequence.
The next prime after 118 is 127, 127-118 = 9 is a square, so 118 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], NextPrime[#] - # > 0 && IntegerQ[Sqrt[NextPrime[#] - #]] &]
    npsQ[n_]:=With[{c=NextPrime[n]-n},c>0&&IntegerQ[Sqrt[c]]]; Select[Range[200],npsQ] (* Harvey P. Dale, May 05 2023 *)
  • PARI
    upto(n) = {my(res = List(1), q = 2, u = nextprime(n + 1)); forprime(p = 3, u, forstep(i = sqrtint(p - q), 1, -1, listput(res, p-i^2) ); q = p ); res } \\ David A. Corneth, Apr 22 2022
    
  • PARI
    isok(k) = issquare(nextprime(k+1)-k); \\ Michel Marcus, Apr 22 2022
Previous Showing 21-30 of 51 results. Next