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

A031928 Lower prime of a difference of 10 between consecutive primes.

Original entry on oeis.org

139, 181, 241, 283, 337, 409, 421, 547, 577, 631, 691, 709, 787, 811, 829, 919, 1021, 1039, 1051, 1153, 1171, 1249, 1399, 1471, 1627, 1699, 1723, 1801, 1879, 2017, 2029, 2053, 2089, 2143, 2521, 2647, 2719, 2731, 2767, 2887, 2917, 3001, 3109, 3361, 3517, 3547, 3571, 3583, 3709, 3769, 3823, 3853, 4201, 4219, 4231, 4243, 4261, 4273, 4327, 4339, 4363, 4483, 4663, 4861, 4909, 4957, 5011, 5179, 5323, 5581, 5659, 5701, 5791, 5869, 6079, 6091
Offset: 1

Views

Author

Lekraj Beedassy, Jul 23 2003

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely, a(n)^(1/n) is a strictly decreasing function of n (see comments at A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(7000) | NextPrime(p)-p eq 10]; // Bruno Berselli, Apr 09 2013
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[800]], 2, 1], #[[2]] - #[[1]] == 10&]] [[1]] (* Harvey P. Dale, Oct 02 2014 *)
    p = Prime@Range@800; p[[Flatten@Position[Differences@p, 10]]] (* Hans Rudolf Widmer, Aug 28 2022 *)
  • PARI
    forprime(p=o=1,1e4,10+o==(o=p)&&print1(p-10",")) \\ M. F. Hasler, Mar 10 2017

Formula

a(n) = prime(A320703(n)). - R. J. Mathar, Apr 30 2024

Extensions

Edited by Labos Elemer, Jul 25 2003

A320701 Indices of primes followed by a gap (distance to next larger prime) of 6.

Original entry on oeis.org

9, 11, 15, 16, 18, 21, 23, 32, 36, 37, 39, 40, 51, 54, 55, 56, 58, 67, 71, 73, 74, 76, 84, 86, 96, 100, 102, 103, 105, 107, 108, 110, 111, 118, 119, 123, 129, 130, 133, 160, 161, 164, 165, 167, 170, 174, 179, 184, 185, 187, 188, 194, 195, 199, 200, 202, 208, 210, 216, 218, 219, 227, 231
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes given in A031924.
Subsequence of indices of sexy primes A023201.

Crossrefs

Equals A000720 o A031924.
Row 3 of A174349.
Indices of 6's in A001223.
Cf. A029707, A029709, A320702, A320703, ..., A320720 (analog for gaps 2, 4, 8, 10, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Mathematica
    Position[Differences[Prime[Range[250]]],6]//Flatten (* Harvey P. Dale, Oct 13 2022 *)
  • PARI
    A(N=100,g=6,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence

Formula

a(n) = A000720(A031924(n)).
A320701 = { i > 0 | prime(i+1) = prime(i) + 6 } = A001223^(-1)({6}).

A320702 Indices of primes followed by a gap (distance to next larger prime) of 8.

Original entry on oeis.org

24, 72, 77, 79, 87, 92, 94, 124, 126, 128, 132, 135, 156, 158, 166, 186, 192, 196, 220, 228, 241, 246, 248, 270, 281, 299, 304, 325, 330, 334, 338, 364, 370, 379, 386, 393, 400, 413, 417, 421, 432, 436, 454, 456, 482, 488, 507, 517, 519, 538, 589, 594, 620, 640, 661, 676, 689, 691, 712, 736, 750, 759
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes given in A031926.

Crossrefs

Equals A000720 o A031926.
Row 4 of A174349.
Indices of 8's in A001223.
Cf. A029707, A029709, A320701, A320703, ..., A320720 (analog for gaps 2, 4, 6, 10, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..800] | NthPrime(n+1) - NthPrime(n) eq 8]; // Vincenzo Librandi, Mar 21 2019
  • Maple
    p:= 2: Res:= NULL: count:= 0:
    for n from 1 while count < 100 do
      q:= nextprime(p);
      if q-p = 8 then count:= count+1; Res:= Res, n; fi;
      p:= q;
    od:
    Res; # Robert Israel, Oct 19 2018
  • Mathematica
    Select[Range[800], Prime[#] + 8 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 21 2019 *)
  • PARI
    A_vec(N=100,g=8,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)}
    

Formula

a(n) = A000720(A031926(n)) = A174349(4,n).
A320702 = { i > 0 | prime(i+1) = prime(i) + 8 } = A001223^(-1)({8}).

A107730 Numbers n such that prime(n+1) has the same last digit as prime(n).

Original entry on oeis.org

34, 42, 53, 61, 68, 80, 82, 101, 106, 115, 125, 127, 138, 141, 145, 154, 157, 172, 175, 177, 191, 193, 204, 222, 233, 258, 259, 266, 269, 279, 289, 306, 308, 310, 316, 324, 369, 383, 397, 399, 403, 418, 422, 431, 442, 443, 474, 480, 491, 497, 500, 502, 518
Offset: 1

Views

Author

Jonathan Vos Post, Jun 12 2007

Keywords

Examples

			a(1) = 34 because prime(34) = 139, prime(35) = 149, both end with the digit 9.
a(2) = 42 because prime(42) = 181, prime(43) = 191, both end with the digit 1.
a(4) = 61 because prime(61) = 283, prime(62) = 293, both end with the digit 3.
a(5) = 68 because prime(68) = 337, prime(69) = 347, both end with the digit 7.
		

Crossrefs

Union of rows r == 0 (mod 5) of A174349. Indices of multiples of 10 (A008592) in A001223.

Programs

  • GAP
    P:=List(Filtered([1..4000],IsPrime),n->Reversed(ListOfDigits(n)));;
    a:=Filtered([1..Length(P)-1],i->P[i+1][1]=P[i][1]); # Muniru A Asiru, Oct 31 2018
  • Maple
    isA107730 := proc(n) local ldign, ldign2 ; ldign := convert(ithprime(n),base,10) ; ldign2 := convert(ithprime(n+1),base,10) ; if op(1,ldign) = op(1,ldign2) then true ; else false ; fi ; end: for n from 1 to 600 do if isA107730(n) then printf("%d, ",n) ; fi ; od ; # R. J. Mathar, Jun 15 2007
  • Mathematica
    Select[Range[200],IntegerDigits[Prime[ # ]][[ -1]]==IntegerDigits[Prime[ #+1]][[ -1]]&] (* Stefan Steinerberger, Jun 14 2007 *)
    Flatten[Position[Partition[Prime[Range[600]],2,1],?(Mod[#[[1]],10] == Mod[#[[2]],10]&),{1},Heads->False]] (* _Harvey P. Dale, Aug 20 2015 *)
  • PARI
    isok(n) = (prime(n) % 10) == prime(n+1) % 10; \\ Michel Marcus, Feb 16 2017
    
  • PARI
    is_A107730(n)=!((nextprime(1+n=prime(n))-n)%10) \\ This (...) is twice as fast as prime(n+1)-prime(n), and prime(n) becomes very slow for n > 41538, even with primelimit = 10^7. - M. F. Hasler, Oct 24 2018
    

Formula

Numbers n such that A000040(n)==A000040(n+1) mod 10, or A000040(n+1) - A000040(n) = 10*k for some integer k, or n such that A129750(n) = 0. [Corrected and edited by M. F. Hasler, Oct 24 2018]
A107730 = A001223^(-1)(A008592) = { i > 0 | A001223(i) == 0 (mod 10)} = U_{k>0} {A174349(5k,j); j >= 1}. - M. F. Hasler, Oct 24 2018
Union of A320703, A320708, A320713, A320718, ... A116493,..., A116496 ... etc. - R. J. Mathar, Apr 30 2024

Extensions

More terms from Stefan Steinerberger and R. J. Mathar, Jun 14 2007

A343496 First point of the straight lines in A340649.

Original entry on oeis.org

5, 31, 194, 1061, 6456, 40080, 251721, 1617206, 10553419, 69709769, 465769825
Offset: 1

Views

Author

Simon Strandgaard and Jamie Morken, Apr 17 2021

Keywords

Comments

prime(a(n)+1) - prime(a(n)) = n*2. E.g., for n=4: prime(a(4)+1) - prime(a(4)) = 4*2, prime(1062) - prime(1061) = 4*2, 8521 - 8513 = 8.

Examples

			For n=1, consider k's with prime gap 1*2 = 2, i.e., k's such that A001223(k)=2. k=5 is the first place where A001223(k)=2 and A141042(k)=A340649(k), so a(1)=5.
For n=2, consider k's with prime gap 2*2 = 4, i.e., k's such that A001223(k)=4. k=31 is the first place where A001223(k)=4 and A141042(k)=A340649(k), so a(2)=31.
For n=3, consider k's with prime gap 3*2 = 6, i.e., k's such that A001223(k)=6. k=194 is the first place where A001223(k)=6 and A141042(k)=A340649(k), so a(3)=194.
		

Crossrefs

Programs

  • Ruby
    n = 1
    last_prime = 2
    find_gap = 2
    result = []
    Prime.each(10_000) do |prime|
        next if prime == 2
        gap = prime - last_prime
        if gap == find_gap
            value = (n * prime) % last_prime
            if value == n * gap
                result << n
                find_gap += 2
            end
        end
        n += 1
        last_prime = prime
    end
    p result

Formula

a(n) = smallest k that satisfies A001223(k) = 2*n and A340649(k) = A141042(k).
Showing 1-5 of 5 results.