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

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

A260416 The smallest prime that is greater than prime(n) and congruent to n mod prime(n).

Original entry on oeis.org

3, 5, 13, 11, 71, 19, 41, 103, 101, 97, 73, 197, 587, 229, 109, 281, 607, 79, 421, 233, 167, 101, 521, 113, 607, 127, 233, 349, 683, 821, 1301, 163, 307, 173, 631, 1093, 1607, 853, 373, 1597, 757, 223, 1571, 1009, 439, 643, 2579, 271, 503, 2111, 983, 769, 1499, 1811, 569, 2423, 3823, 3581, 613, 2027, 1193, 941, 677, 997
Offset: 1

Views

Author

Ivan N. Ianakiev, Jul 25 2015

Keywords

Examples

			Prime(4)=7, and the smallest prime that is greater than 7 and congruent to 4 mod 7 is 11, so a(4)=11.
		

Crossrefs

Programs

  • Haskell
    a260416 n = a260416_list !! (n-1)
    a260416_list = f 1 a000040_list where
       f x (p:ps) = g ps where
           g (q:qs) = if (q - x) `mod` p == 0 then q : f (x + 1) ps else g qs
    -- Reinhard Zumkeller, Aug 20 2015
  • Mathematica
    lst={};Do[w=1;Label[begin];
    If[PrimeQ[w*Prime[n]+n],AppendTo[lst,w*Prime[n]+n],w=w+1;Goto[begin]],{n,100}];lst
  • PARI
    first(m)={my(v=vector(m),t,p);for(i=1,m,t=i;while(1,p=prime(t);if((p-i)%prime(i)==0,v[i]=p;break,t++);));v;} /* Anders Hellström, Aug 11 2015 */
    

A261192 a(0) = 2; for n>0, a(n) = smallest prime p such that p > a(n-1) and p is congruent to n modulo prime(n).

Original entry on oeis.org

2, 3, 5, 13, 53, 71, 97, 109, 179, 193, 271, 383, 419, 587, 659, 673, 811, 1433, 1543, 1627, 2221, 2357, 4051, 4339, 4919, 5651, 5783, 6619, 6983, 7877, 8053, 11969, 12739, 12911, 14629, 15233, 15287, 15737, 18131, 18743, 20627, 21163, 21943, 22963, 23011, 23291, 25717, 26633, 27031, 27743
Offset: 0

Views

Author

Keywords

Comments

a(n) == A186102(n) == A260416(n) (mod n).
a(10314) = 10000363333.

Examples

			a(4) = 53 because prime(4) = 7, 53 == 4 (mod 7) and 53 is the smallest such prime greater than a(3) = 13.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Block[{k = Prime@ n, q = Prime@ n}, While[k + n <= f[n - 1] || ! PrimeQ[k + n], k += q]; k + n]; f[0] = 2; Array[f, 50, 0]
Showing 1-3 of 3 results.