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 128 results. Next

A295973 Primes introducing new second differences in A036263.

Original entry on oeis.org

3, 5, 7, 11, 29, 31, 113, 127, 139, 149, 509, 523, 541, 907, 1069, 1087, 1151, 1327, 1361, 1543, 1669, 1933, 1951, 2971, 2999, 3163, 5381, 5749, 6421, 7963, 9551, 10007, 14143, 15683, 15727, 15823, 16183, 19373, 19609, 20809, 25471, 28277, 28351, 31397, 31469, 31957, 34061, 34123, 35671
Offset: 1

Views

Author

Edward Bernstein, Nov 30 2017

Keywords

Comments

This list consists of those primes corresponding to new second differences in A036263. There are 97 new second differences introduced up to the 100000th prime.

Examples

			The new values in A036263 are 1, 0, 2, -2, -4, 4, 10, -10, 8, -8, ... at indices 1, 2, 3, 4, 9, 10, 29, 30, ... and the middle primes of the prime triple starting at these indices are 3, 5, 7, 11, 29, ...
		

Crossrefs

Programs

  • Maple
    A036263s := proc(maxn)
        s := {} ;
        for n from 1 to maxn do
            s := s union {A036263(n)} ;
        end do:
        s ;
    end proc:
    A295973a := proc(n)
        if n = 1 then
            return 2;
        end if;
        p := nextprime(procname(n-1)) ;
        pidx := numtheory[pi](p) ;
        while true do
            candD := A036263(pidx) ;
            if not candD in A036263s(pidx-1) then
                return ithprime(pidx) ;
            end if ;
            pidx := pidx+1 ;
        end do:
    end proc:
    A295973 := proc(n)
        nextprime(A295973a(n)) ;
    end proc:
    seq(A295973(n),n=1..40) ; # R. J. Mathar, Jan 06 2018

A293154 Record high values in A036263.

Original entry on oeis.org

1, 2, 4, 10, 16, 28, 32, 40, 46, 50, 68, 70, 80, 92, 98, 104, 116, 124, 142, 144, 160, 186, 206, 216, 232, 236, 238, 248, 272, 274, 278, 280, 286, 292, 332, 348, 356, 378, 382, 436, 438, 454, 462
Offset: 1

Views

Author

N. J. A. Sloane, Oct 10 2017

Keywords

Crossrefs

Programs

  • Maple
    i := 0 ;
    arec := 0 ;
    for i from 1 do
        a := A036263(i) ;
        if a > arec then
            arec := a;
            printf("%d,\n",arec) ;
        end if;
    end do: # R. J. Mathar, Oct 13 2017
  • PARI
    See Links section.

Extensions

a(19)-a(43) from Rémy Sigrist, Mar 17 2019

A293155 Indices of record high values in A036263.

Original entry on oeis.org

1, 3, 10, 29, 98, 216, 1182, 1830, 2224, 2809, 3384, 17005, 23282, 30801, 31544, 40932, 103519, 104070, 149688, 887312, 1094420, 1319944, 2850173, 6957875, 10655461, 20684331, 24805378, 27180064, 33772761, 64955633, 82618491, 90422071, 95831002, 112228682
Offset: 1

Views

Author

N. J. A. Sloane, Oct 10 2017

Keywords

Crossrefs

Programs

  • Maple
    arec := 0 ;
    for i from 1 do
        a := A036263(i) ;
        if a > arec then
            arec := a;
            printf("%d,\n",i) ;
        end if;
    end do: # R. J. Mathar, Oct 13 2017
  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Mar 17 2019

A376656 Sorted positions of first appearances in the second differences (A036263) of consecutive primes (A000040).

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 29, 30, 33, 34, 96, 98, 99, 154, 179, 180, 189, 216, 217, 242, 262, 294, 296, 428, 429, 446, 708, 756, 834, 1005, 1182, 1229, 1663, 1830, 1831, 1846, 1879, 2191, 2224, 2343, 2809, 3077, 3086, 3384, 3385, 3427, 3643, 3644, 3793, 3795, 4230
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2024

Keywords

Comments

The prime numbers are (A000040):
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...
with first differences (A001223):
1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, ...
with second differences (A036263):
1, 0, 2, -2, 2, -2, 2, 2, -4, 4, -2, -2, 2, 2, 0, -4, 4, -2, -2, 4, -2, 2, 2, ...
with sorted first appearances at (A376656):
1, 2, 3, 4, 9, 10, 29, 30, 33, 34, 96, 98, 99, 154, 179, 180, 189, 216, 217, ...

Crossrefs

These are the sorted positions of first appearances in A036263.
For first differences we had A373400(n) + 1, except initial terms.
For prime-powers instead of prime numbers we have A376653/A376654.
For squarefree instead of prime numbers we have A376655, sorted firsts of A376590.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, complement A013929 (differences A078147).
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    q=Differences[Select[Range[1000],PrimeQ],2];
    Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]

A094900 a(n) = floor( prime(n-1)*A036263(n-2)/ A001223(n-1)).

Original entry on oeis.org

1, 0, 3, -11, 6, -17, 9, 7, -58, 20, -19, -41, 21, 15, 0, -118, 40, -34, -71, 48, -40, 27, 22, -97, -101, 51, -107, 54, 80, -318, 43, -274, 111, -596, 100, 0, -82, 55, 0, -358, 144, -764, 96, -197, 165, 0, -446, -227, 114, 77, -478, 192, -168, 0, 0, -538, 180, -139
Offset: 3

Views

Author

Roger L. Bagula, Jun 14 2004

Keywords

Programs

  • Mathematica
    Table[Abs[Floor[Prime[n-1]*(Prime[n]-2*Prime[n-1]+Prime[n-2])/(Prime[n]-Prime[n-1])]], {n, 3, 203}]

A216094 a(1) = 2; a(n+1) = a(n) + |A036263(n)| + 2.

Original entry on oeis.org

2, 5, 7, 11, 15, 19, 23, 27, 31, 37, 43, 47, 51, 55, 59, 61, 67, 73, 77, 81, 87, 91, 95, 99, 105, 109, 113, 117, 121, 133, 145, 149, 155, 165, 175, 181, 183, 187, 191, 193, 199, 209, 219, 223, 227, 239, 241, 251, 255, 259, 263, 269, 279, 285, 287, 289, 295, 301, 305, 309, 319
Offset: 1

Views

Author

Thomas Ordowski, Sep 01 2012

Keywords

Comments

The probabilistic primes model.
Conjecture: a(n) ~ prime(n).

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a+Abs[Prime[n+2]-2Prime[n+1]+Prime[n]]+2}; Transpose[ NestList[nxt,{1,2},60]][[2]] (* Harvey P. Dale, Aug 11 2015 *)

Formula

a(1)=2; a(n+1) = a(n) + |prime(n+2) - 2*prime(n+1) + prime(n)| + 2.

A001223 Prime gaps: differences between consecutive primes.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6, 12
Offset: 1

Views

Author

Keywords

Comments

There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - Rémi Eismann, Feb 14 2008
Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - John W. Nicholson, Dec 14 2011
A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - Thomas Ordowski, Oct 11 2014
a(n) = A008347(n+1) - A008347(n-1). - Reinhard Zumkeller, Feb 09 2015
Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - Robert Israel, Feb 12 2015
lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - Thomas Ordowski, Mar 09 2015
a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - Reinhard Zumkeller, Aug 23 2015
If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - Andres Cicuttin, Jul 14 2016
Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - Andres Cicuttin, Sep 23 2018
Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Row m of A174349 lists all indices n for which a(n) = 2m. - M. F. Hasler, Oct 26 2018
Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - M. F. Hasler, Oct 26 2018
Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - Andres Cicuttin, Sep 01 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
Second difference is A036263, first occurrence is A000230.
For records see A005250, A005669.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Haskell
    a001223 n = a001223_list !! (n-1)
    a001223_list = zipWith (-) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Magma
    [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
  • Mathematica
    Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i]);
    diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
    
  • Python
    from sympy import prime
    def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
  • Sage
    differences(prime_range(1000)) # Joerg Arndt, May 15 2011
    

Formula

G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
A167770(n) == a(n)^2 (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023

Extensions

More terms from James Sellers, Feb 19 2001

A006562 Balanced primes (of order one): primes which are the average of the previous prime and the following prime.

Original entry on oeis.org

5, 53, 157, 173, 211, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1511, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4409, 4457, 4597, 4657, 4691, 4993, 5107, 5113, 5303, 5387, 5393
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A075540. - Franklin T. Adams-Watters, Jan 11 2006
This subsequence of A125830 and of A162174 gives primes of level (1,1): More generally, the i-th prime p(i) is of level (1,k) if and only if it has level 1 in A117563 and 2 p(i) - p(i+1) = p(i-k). - Rémi Eismann, Feb 15 2007
Note the similarity between plots of A006562 and A013916. - Bill McEachen, Sep 07 2009
Balanced primes U strong primes = good primes. Or, A006562 U A051634 = A046869. - Juri-Stepan Gerasimov, Mar 01 2010
Primes prime(n) such that A001223(n-1) = A001223(n). - Irina Gerasimova, Jul 11 2013
Numbers m such that A346399(m) is odd and >= 3. - Ya-Ping Lu, Dec 26 2021 and May 07 2024
"Balanced" means that the next and preceding gap are of the same size, i.e., the second difference A036263 vanishes; so these are the primes whose indices are 1 more than indices of zeros in A036263, listed in A064113. - M. F. Hasler, Oct 15 2024
Primes which are the average of three consecutive primes. - Peter Schorn, Apr 30 2025

Examples

			5 belongs to the sequence because 5 = (3 + 7)/2. Likewise 53 = (47 + 59)/2.
5 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (3, 5, 7).
53 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (47, 53, 59).
257 and 263 belong to the sequence because they are terms, but not first or last, of the AP of consecutive primes (251, 257, 263, 269).
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.

Crossrefs

Primes A000040 whose indices are 1 more than A064113, indices of zeros in A036263 (second differences of the primes).
Cf. A225494 (multiplicative closure); complement of A178943 with respect to A000040.
Cf. A055380, A051795, A081415, A096710 for other balanced prime sequences.

Programs

  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = filter ((== 1) . a010051) a075540_list
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = h a000040_list where
       h (p:qs@(q:r:ps)) = if 2 * q == (p + r) then q : h qs else h qs
    -- Reinhard Zumkeller, May 09 2013
    
  • Magma
    [a: n in [1..1000] | IsPrime(a) where a is NthPrime(n)-NthPrime(n+1)+NthPrime(n+2)]; // Vincenzo Librandi, Jun 23 2016
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[1000]], 3, 1], #[[2]] ==(#[[1]] + #[[3]])/2 &]][[2]]
    p=Prime[Range[1000]]; p[[Flatten[1+Position[Differences[p, 2], 0]]]]
    Prime[#]&/@SequencePosition[Differences[Prime[Range[800]]],{x_,x_}][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 31 2019 *)
  • PARI
    betwixtpr(n) = { local(c1,c2,x,y); for(x=2,n, c1=c2=0; for(y=prime(x-1)+1,prime(x)-1, if(!isprime(y),c1++); ); for(y=prime(x)+1,prime(x+1)-1, if(!isprime(y),c2++); ); if(c1==c2,print1(prime(x)",")) ) } \\ Cino Hilliard, Jan 25 2005
    
  • PARI
    forprime(p=1,999, p-precprime(n-1)==nextprime(p+1)-p && print1(p",")) \\ M. F. Hasler, Jun 01 2013
    
  • PARI
    is(n)=n-precprime(n-1)==nextprime(n+1)-n && isprime(n) \\ Charles R Greathouse IV, Apr 07 2016
    
  • Python
    from sympy import nextprime; p, q, r = 2, 3, 5
    while q < 6000:
        if 2*q == p + r: print(q, end = ", ")
        p, q, r = q, r, nextprime(r) # Ya-Ping Lu, Dec 23 2021

Formula

2*p_n = p_(n-1) + p_(n+1).
Equals { p = prime(k) | A118534(k) = prime(k-1) }. - Rémi Eismann, Nov 30 2009
a(n) = A000040(A064113(n) + 1) = (A122535(n) + A181424(n)) / 2. - Reinhard Zumkeller, Jan 20 2012
a(n) = A122535(n) + A117217(n). - Zak Seidov, Feb 14 2013
Equals A145025 intersect A000040 = A145025 \ A024675. - M. F. Hasler, Jun 01 2013
Conjecture: Limit_{n->oo} n*(log(a(n)))^2 / a(n) = 1/2. - Alain Rocchelli, Mar 21 2024
Conjecture: The asymptotic limit of the average of a(n+1)-a(n) is equivalent to 2*(log(a(n)))^2. Otherwise formulated: 2 * Sum_{n=1..N} (log(a(n)))^2 ~ a(N). - Alain Rocchelli, Mar 23 2024

Extensions

Reworded comment and added formula from R. Eismann. - M. F. Hasler, Nov 30 2009
Edited by Daniel Forgues, Jan 15 2011

A046933 Number of composites between successive primes.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 3, 5, 1, 5, 3, 1, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 1, 3, 13, 3, 5, 1, 9, 1, 5, 5, 3, 5, 5, 1, 9, 1, 3, 1, 11, 11, 3, 1, 3, 5, 1, 9, 5, 5, 5, 1, 5, 3, 1, 9, 13, 3, 1, 3, 13, 5, 9, 1, 3, 5, 7, 5, 5, 3, 5, 7, 3, 7, 9, 1, 9, 1, 5, 3, 5, 7, 3, 1, 3, 11, 7, 3, 7, 3, 5, 11, 1, 17
Offset: 1

Views

Author

Marc LeBrun, Dec 11 1999

Keywords

Comments

a(n) is odd for n>1 since all primes except 2 are odd. - Joel Brennan, Jan 02 2023

Examples

			a(1) = 0 since 2 is adjacent to 3;
a(2) = 1 since 4 is between 3 and 5;
a(4) = 3 = 11 - 7 - 1, etc.
		

Crossrefs

Cf. A008996 (record values > 0).

Programs

Formula

a(n) = prime(n+1) - prime(n) - 1 = A000040(n+1) - A000040(n) - 1.
a(n) = A001223(n) - 1.
a(n) = 2*A028334(n) - 1 for n>1. - Giovanni Teofilatto, Apr 19 2010
a(n) = Sum_{i=1..n-1} A036263(i). - Daniel Forgues, Apr 07 2014

A053289 First differences of consecutive perfect powers (A001597).

Original entry on oeis.org

3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, 35, 19, 18, 39, 41, 43, 28, 17, 47, 49, 51, 53, 55, 57, 59, 61, 39, 24, 65, 67, 69, 71, 35, 38, 75, 77, 79, 81, 47, 36, 85, 87, 89, 23, 68, 71, 10, 12, 95, 97, 99, 101, 103, 40, 65, 107, 109, 100
Offset: 1

Views

Author

Labos Elemer, Mar 03 2000

Keywords

Comments

Michel Waldschmidt writes: Conjecture 1.3 (Pillai). Let k be a positive integer. The equation x^p - y^q = k where the unknowns x, y, p and q take integer values, all >= 2, has only finitely many solutions (x,y,p,q). This means that in the increasing sequence of perfect powers [A001597] the difference between two consecutive terms [the present sequence] tends to infinity. It is not even known whether for, say, k=2, Pillai's equation has only finitely many solutions. A related open question is whether the number 6 occurs as a difference between two perfect powers. See Sierpiński [1970], problem 238a, p. 116. - Jonathan Vos Post, Feb 18 2008
Are there are any adjacent equal terms? - Gus Wiseman, Oct 08 2024

Examples

			Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
		

References

  • Wacław Sierpiński, 250 problems in elementary number theory, Modern Analytic and Computational Methods in Science and Mathematics, No. 26, American Elsevier, Warsaw, 1970, pp. 21, 115-116.
  • S. S. Pillai, On the equation 2^x - 3^y = 2^X - 3^Y, Bull, Calcutta Math. Soc. 37 (1945) 15-20.

Crossrefs

For non-perfect-powers (A007916) we have A375706.
The union is A023055.
For prime-powers (A000961 or A246655) we have A057820.
Sorted positions of first appearances are A376268, complement A376519.
For second differences we have A376559.
Ascending and descending points are A376560 and A376561.
A001597 lists perfect-powers.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.

Programs

  • Mathematica
    Differences@ Select[Range@ 3200, # == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Jun 30 2016, after Ant King at A001597 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A053289(n):
        if n==1: return 3
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax)+1 >= kmax:
            kmax <<= 1
        rmin, rmax = 1, kmax
        while True:
            kmid = kmax+kmin>>1
            if f(kmid)+1 < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        while True:
            rmid = rmax+rmin>>1
            if f(rmid) < rmid:
                rmax = rmid
            else:
                rmin = rmid
            if rmax-rmin <= 1:
                break
        return kmax-rmax # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A001597(n+1) - A001597(n). - Jonathan Vos Post, Feb 18 2008
From Amiram Eldar, Jun 30 2023: (Start)
Formulas from Jakimczuk (2016):
Lim sup_{n->oo} a(n)/(2*n) = 1.
Lim inf_{n->oo} a(n)/(2*n)^(2/3 + eps) = 0. (End)
Can be obtained by inserting 0 between 3 and 6 in A375702 and then adding 1 to all terms. In particular, for n > 2, a(n+1) - 1 = A375702(n). - Gus Wiseman, Sep 14 2024
Showing 1-10 of 128 results. Next