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 51-60 of 63 results. Next

A334614 a(n) = pi(prime(n) - n) + n, where pi is the prime counting function.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 11, 13, 15, 18, 19, 21, 22, 24, 26, 28, 30, 32, 34, 35, 36, 38, 40, 42, 45, 47, 48, 50, 51, 53, 55, 57, 60, 61, 65, 66, 67, 68, 70, 72, 74, 76, 77, 79, 81, 82, 85, 88, 89, 91, 93, 94, 95, 99, 101, 102, 104, 105, 106, 107, 108, 112, 116, 117
Offset: 1

Views

Author

Ya-Ping Lu, Sep 08 2020

Keywords

Comments

It can be shown that a(n) > a(n-1) >= 1 and a(n) <= 2*n - 1 < 2*n (see proofs in the Links section).

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[Prime[n] - n] + n, {n, 1, 64}] (* Amiram Eldar, Sep 09 2020 *)
  • PARI
    a(n) = n + primepi(prime(n) - n); \\ Michel Marcus, Sep 09 2020
  • Python
    from sympy import prime, primepi
    for n in range(1, 100001):
        a_n = primepi(prime(n) - n) + n
        print(a_n)
    

Formula

a(n) = A000720(A014689(n)) + n.
a(n) = A065328(n) + n. - Michel Marcus, Sep 12 2020

A358166 a(1) = 13; for n > 1, if a(n-1) is even, then a(n) = a(n-1)/2; otherwise, a(n) = a(n-1) + prime(a(n-1)).

Original entry on oeis.org

13, 54, 27, 130, 65, 378, 189, 1318, 659, 5592, 2796, 1398, 699, 5972, 2986, 1493, 13996, 6998, 3499, 36102, 18051, 218932, 109466, 54733, 730334, 365167, 5622764, 2811382, 1405691, 23685544, 11842772, 5921386, 2960693, 52246474, 26123237, 521463688, 260731844, 130365922, 65182961, 1364229390
Offset: 1

Views

Author

Sander G. Huisman, Nov 01 2022

Keywords

Comments

Does this sequence become cyclic? All the sequences defined the same as this one but with 1 <= a(1) <= 12 are known to become cyclic.
a(81) = 1977693361846020549, so calculating a(82) will require calculating the 1977693361846020549th prime.

Examples

			a(1) = 13 is odd, so a(2) = 13 + prime(13) = 13 + 41 = 54.
a(2) = 54 is even, so a(3) = a(2)/2 = 54/2 = 27.
a(3) = 27 is odd, so a(4) = 27 + prime(27) = 27 + 103 = 130, etc.
		

Crossrefs

Programs

  • Mathematica
    NestList[If[EvenQ[#], #/2, # + Prime[#]] &, 13, 40]
  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 13; for (n=2, nn, if (va[n-1] % 2, va[n] = va[n-1] + prime(va[n-1]), va[n] = va[n-1]/2);); va; \\ Michel Marcus, Nov 12 2022

A104897 Difference between (n+prime(n)) and next prime.

Original entry on oeis.org

2, 2, 3, 2, 1, 4, 5, 2, 5, 2, 1, 4, 5, 2, 5, 2, 3, 4, 3, 6, 3, 2, 1, 14, 5, 4, 1, 2, 1, 6, 5, 4, 3, 6, 7, 4, 3, 10, 5, 10, 3, 4, 5, 2, 9, 6, 5, 6, 1, 2, 9, 2, 13, 2, 1, 12, 5, 2, 1, 6, 3, 4, 3, 4, 1, 6, 3, 4, 3, 2, 7, 2, 3, 2, 3, 2, 1, 4, 7, 2, 3, 6, 7, 4, 17
Offset: 1

Views

Author

Zak Seidov, Apr 25 2005

Keywords

Crossrefs

Programs

  • PARI
    a(n) = nextprime(n + prime(n) + 1) - (n + prime(n)); \\ Michel Marcus, Oct 09 2013

Formula

a(n)=A104860(n)-A014688(n).

Extensions

More terms from Michel Marcus, Oct 09 2013

A106034 a(n) is the least number such that n*prime(n)+a(n) is a perfect cube.

Original entry on oeis.org

6, 2, 12, 36, 9, 47, 6, 64, 9, 53, 2, 68, 196, 127, 24, 152, 328, 233, 58, 308, 195, 459, 288, 61, 319, 118, 594, 379, 214, 706, 159, 721, 392, 187, 617, 396, 23, 665, 346, 1080, 661, 398, 1048, 769, 396, 107, 731, 1463, 1044, 717, 284, 1396, 1051, 270, 1490, 897
Offset: 1

Views

Author

Zak Seidov, May 05 2005

Keywords

Examples

			a(10)=53 because 10*prime(10)+a(10) = 10*29 + 53 = 343 = 7^3.
		

Crossrefs

Cf. A014688.

Programs

  • Mathematica
    f[n_] := (Ceiling[(n*Prime[n])^(1/3)])^3 - n*Prime[n]; Table[f[n], {n, 100}]

Extensions

Extended by Ray Chandler, May 07 2005

A107294 GCD of (n + prime(n)) and (n + 1 + prime(n+1)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Zak Seidov, May 20 2005

Keywords

Examples

			a(139) = 13 because {(139 + prime(139)), (140 + prime(140))} = {936, 949} ={13*72,13*73}.
		

Crossrefs

Cf. A014688.

Programs

  • Mathematica
    Table[GCD[n+Prime[n], n+1+Prime[n+1]], {n, 150}]
    GCD@@#&/@Partition[Table[n+Prime[n],{n,150}],2,1] (* Harvey P. Dale, Mar 19 2023 *)

A114066 n plus the n-th prime gives a fourth power.

Original entry on oeis.org

5, 503, 9229, 53132, 1077614, 5673932, 12335313, 18002978, 89720978, 93036654, 133588773, 167057609, 200368277, 266488037, 270168848, 300988608, 379786284, 693620392, 954150797, 1585905060, 1957585697, 2039039592, 2280501932
Offset: 1

Views

Author

Giovanni Resta, Feb 13 2006

Keywords

Examples

			5 + prime(5) = 5 + 11 = 16 = 2^4.
12335313 + prime(12335313) = 236421376 = 124^4.
		

Crossrefs

Cf. A014688, subsequence of A064371.

Programs

  • PARI
    isok(n) = ispower(n+prime(n), 4); \\ Michel Marcus, Jan 08 2014

Extensions

a(11)-a(23) from Donovan Johnson, Jul 02 2010

A187882 Terms of A186102 for which A186102(n) > n + prime(n).

Original entry on oeis.org

103, 101, 97, 197, 229, 109, 281, 233, 167, 607, 233, 349, 821, 307, 631, 1093, 853, 373, 1597, 1009, 439, 643, 503, 2111, 983, 769, 1811, 569, 2423, 3823, 3581, 2027, 941, 677, 997, 691, 1753, 3539, 1193, 5381, 4289, 2411, 2063, 1307, 919, 8311, 2719, 3187, 6373, 1459, 3331, 9431
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 14 2011

Keywords

Comments

Equivalently, A186102(n) for those n where neither n nor n+prime(n) is prime.

Examples

			A186102(8) = 103 > 8 + prime(8)= 27, so a(1) = 103.
		

Crossrefs

Programs

  • Maple
    A186102 := proc(n) local p ,pn; p := 2 ; pn := ithprime(n) ; while modp(p,pn) <> modp(n,pn) do p := nextprime(p) end do: return p ; end proc:
    for n from 1 to 100 do if A186102(n) > n+ithprime(n) then printf("%d,",A186102(n)); end if; end do; # R. J. Mathar, Mar 19 2011

Extensions

Definition corrected by Franklin T. Adams-Watters, Mar 16 2011

A230847 a(n) = 1 + A054541(n).

Original entry on oeis.org

3, 2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 9, 5, 3, 5, 3, 5, 15, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 15, 5, 3, 5, 15, 7, 11, 3, 5, 7, 9, 7, 7, 5, 7, 9, 5, 9, 11, 3, 11, 3, 7, 5, 7, 9, 5, 3, 5, 13, 9, 5, 9, 5, 7
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2013

Keywords

Comments

Partial sums give A014688.

Examples

			On the first quadrant of the square grid consider a diagram in which the n-th horizontal bar contains A000040(n) cells and in which the number of cells in the vertical bars gives 0 together with A000720 as shown below. a(n) is the sum of the length of the n-th horizontal boundary segment and the length of the n-th vertical boundary segment between the structure formed by the horizontal bars and the structure formed by the vertical bars, hence a(n) = A054541(n) + 1. The total length of the boundary segments from [0, 0] after n-th stage is A014688(n).
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13  |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11  |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7   |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5   |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3   |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2   |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
.    0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
.
		

Crossrefs

Formula

a(n) = A230846(n) = A076368(n), n>1. - R. J. Mathar, May 16 2023

A239280 Powers of 2 that are sum of prime(k) + k for some k.

Original entry on oeis.org

8, 16, 32, 4096
Offset: 1

Views

Author

Zak Seidov, Mar 14 2014

Keywords

Comments

a(5) > 2^47. - Giovanni Resta, Mar 14 2014
a(5) > 2^62 if it exists. - Chai Wah Wu, Apr 28 2018

Examples

			3 + prime(3) = 8 = 2^3.
5 + prime(5) = 16 = 2^4.
9 + prime(9) = 32 = 2^5.
503 + prime(503) = 4096 = 2^12.
		

Crossrefs

A277186 Sum of primes within 2n-wide closed interval centered upon prime(n).

Original entry on oeis.org

5, 10, 17, 26, 31, 67, 83, 83, 119, 139, 161, 228, 281, 281, 341, 408, 474, 553, 546, 635, 635, 780, 824, 1092, 954, 1008, 1008, 1139, 1197, 1336, 1621, 1687, 1650, 1823, 1854, 1854, 2238, 2634, 2507, 2587, 2450, 2673, 3223, 3223, 3403, 3403, 3591, 4054, 4054, 4331, 4535, 4535, 4828, 4444, 4666
Offset: 1

Views

Author

Walter Carlini, Oct 04 2016

Keywords

Comments

a(n) is the sum of primes within the closed interval [prime(n)-n, prime(n)+n], where prime(n) is the n-th prime.

Examples

			a(3) = 2 + 3 + 5 + 7 = 17; starting at prime(3) = 5, subtract 3 and add 3 to obtain the interval 2 through 8, and then add up the primes within that interval, inclusive of the endpoints of the interval.
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Select[Range[Prime@ n - n, Prime@ n + n], PrimeQ], {n, 55}] (* Michael De Vlieger, Oct 04 2016 *)
  • PARI
    a(n) = sum(k=prime(n)-n, prime(n)+n, isprime(k)*k); \\ Michel Marcus, Nov 01 2016

Extensions

More terms from Michael De Vlieger, Oct 04 2016
Previous Showing 51-60 of 63 results. Next