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

A206038 Values of the difference d for 4 primes in arithmetic progression with the minimal start sequence {5 + j*d}, j = 0 to 3.

Original entry on oeis.org

6, 12, 18, 42, 48, 54, 84, 96, 126, 132, 252, 348, 396, 426, 438, 474, 594, 636, 642, 648, 678, 804, 858, 1176, 1218, 1272, 1302, 1314, 1362, 1428, 1482, 1566, 1692, 1728, 1896, 1992, 2064, 2106, 2238, 2394, 2442, 2574, 2616, 2688, 2694, 2706, 2832, 2856, 2898
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.

Examples

			d = 18 then {5, 5 + 1*18, 5 + 2*18, 5 + 3*18} = {5, 23, 41, 59}, which is 4 primes in arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[PrimeQ[{5, 5 + d, 5 + 2*d, 5 + 3*d}] == {True, True, True, True}, AppendTo[t, d]], {d, 3000}]; t

A206043 Values of the difference d for 9 primes in arithmetic progression with the minimal start sequence {11 + j*d}, j = 0 to 8.

Original entry on oeis.org

32671170, 54130440, 59806740, 145727400, 224494620, 246632190, 280723800, 301125300, 356845020, 440379870, 486229380, 601904940, 676987920, 777534660, 785544480, 789052530, 799786890, 943698210, 1535452800, 1536160080, 1760583300, 1808008020
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.

Examples

			d = 54130440 then {11, 54130451, 108260891, 162391331, 216521771, 270652211, 324782651, 378913091, 433043531} which is 9 primes in arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    a = 11; t = {}; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d, a + 7*d, a + 8*d}] == {True, True, True, True, True, True, True, True, True}, AppendTo[t,d]], {d, 10^9}]; t
  • PARI
    forstep(k=210,1e10,210,forstep(p=k+11,8*k+11,k,if(!isprime(p), next(2)));print1(k", ")) \\ Charles R Greathouse IV, Feb 09 2012

Extensions

a(20) corrected by Charles R Greathouse IV, Feb 09 2012

A206040 Values of the difference d for 6 primes in arithmetic progression with the minimal start sequence {7 + j*d}, j = 0 to 5.

Original entry on oeis.org

30, 150, 930, 2760, 3450, 4980, 9150, 14190, 19380, 20040, 21240, 28080, 33930, 57660, 59070, 63600, 69120, 76710, 80340, 81450, 97380, 100920, 105960, 114750, 117420, 122340, 134250, 138540, 143670, 150090, 164580, 184470, 184620, 189690, 231360, 237060
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.

Examples

			d = 150 then {7, 7 + 1*150, 7 + 2*150, 7 + 3*150, 7 + 4*150, 7 + 5*150} = {7, 157, 307, 457, 607, 757} which is 6 primes in arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    a = 7; t = {}; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d}] == {True, True, True, True, True, True}, AppendTo[t,d]], {d, 300000}]; t
    Select[Range[250000],AllTrue[7+#*Range[0,5],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 26 2017 *)

A092953 Number of primes of the form n+p, where p is a prime < n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 0, 2, 1, 2, 1, 3, 0, 2, 1, 3, 1, 3, 0, 3, 1, 2, 0, 6, 0, 4, 1, 3, 1, 6, 0, 3, 0, 4, 1, 6, 0, 4, 1, 5, 1, 8, 0, 4, 1, 4, 0, 7, 0, 6, 1, 4, 0, 9, 0, 8, 1, 4, 1, 11, 0, 5, 0, 5, 1, 11, 0, 6, 1, 8, 1, 9, 0, 4, 0, 7, 1, 11, 0, 7, 1, 4, 0, 13, 0, 7, 1, 5, 0, 15, 0, 7, 0, 8, 1, 13, 0, 8, 1, 9, 1, 11
Offset: 1

Views

Author

Amarnath Murthy, Mar 24 2004

Keywords

Comments

Might be called the additive primability of n.
a(A007921(n))=0; for n > 2: a(A030173(n)) > 0 and a(A040976(n)) = 1. - Reinhard Zumkeller, Nov 10 2012

Examples

			a(26) = 4: the primes are 29, 31, 37 and 43.
		

Crossrefs

Cf. A092954.
Cf. A061357.

Programs

  • Haskell
    a092953 n = sum $
       zipWith (\u v -> a010051' u * a010051' v) [1 .. n - 1] [n + 1 ..]
    -- Reinhard Zumkeller, Nov 10 2012
  • PARI
    for(n=1,105,c=0;forprime(p=2,n-1,if(isprime(n+p),c++));print1(c,","))
    

Extensions

More terms from Klaus Brockhaus and Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004

A086800 Triangle read by rows in which row n lists differences between prime(n) and prime(k) for 1 <= k <= n.

Original entry on oeis.org

0, 1, 0, 3, 2, 0, 5, 4, 2, 0, 9, 8, 6, 4, 0, 11, 10, 8, 6, 2, 0, 15, 14, 12, 10, 6, 4, 0, 17, 16, 14, 12, 8, 6, 2, 0, 21, 20, 18, 16, 12, 10, 6, 4, 0, 27, 26, 24, 22, 18, 16, 12, 10, 6, 0, 29, 28, 26, 24, 20, 18, 14, 12, 8, 2, 0, 35, 34, 32, 30, 26, 24, 20, 18, 14, 8, 6, 0
Offset: 1

Views

Author

Cino Hilliard, Aug 05 2003

Keywords

Comments

Primes in this sequence are of course twin primes.

Examples

			2-2=0; 3-2=1, 3-3=0; 5-2=3, 5-3=2, 5=5=5; 7-2=5, 7-3=4, 7-5=2, 7-7=0, ...
Triangle begins:
  0;
  1, 0;
  3, 2, 0;
  5, 4, 2, 0;
  9, 8, 6, 4, 0;
  11, 10, 8, 6, 2, 0;
  15, 14, 12, 10, 6, 4, 0;
  17, 16, 14, 12, 8, 6, 2, 0;
		

Crossrefs

Cf. A040976 (1st column).

Programs

  • PARI
    fn(n) = forprime(x=2,n, forprime(y=2,x,print1(x-y",")))
    
  • PARI
    T(n, k) = prime(n) - prime(k);
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Aug 08 2017

Extensions

Offset corrected by Michel Marcus, Aug 08 2017

A166010 a(n) = prime(n)^2-4.

Original entry on oeis.org

0, 5, 21, 45, 117, 165, 285, 357, 525, 837, 957, 1365, 1677, 1845, 2205, 2805, 3477, 3717, 4485, 5037, 5325, 6237, 6885, 7917, 9405, 10197, 10605, 11445, 11877, 12765, 16125, 17157, 18765, 19317, 22197, 22797, 24645, 26565, 27885, 29925, 32037
Offset: 1

Views

Author

Keywords

Comments

Least common multiple of prime(n)-2 and prime(n)+2.

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2-4: n in [1..41]]; // Bruno Berselli, Apr 17 2012
    
  • Mathematica
    f[n_]:=LCM[n-2,n+2]; lst={};Do[p=Prime[n];AppendTo[lst,f[p]],{n,5!}]; lst
    Prime[Range[5!]]^2 - 4 (* Zak Seidov, Apr 17 2012 *)
  • PARI
    a(n)=prime(n)^2-4 \\ Charles R Greathouse IV, Apr 17 2012

Formula

a(n) = A001248(n)-4 = A040976(n)*A052147(n). [Bruno Berselli, Apr 17 2012]

Extensions

Definition rewritten by Bruno Berselli, Apr 17 2012

A379011 Square array A(n, k) = 2*phi(A246278(n, k)) - A246278(n, k), read by falling antidiagonals; A083254, (2*phi(n)-n), applied to the prime shift array.

Original entry on oeis.org

0, 0, 1, -2, 3, 3, 0, 1, 15, 5, -2, 9, 13, 35, 9, -4, 3, 75, 43, 99, 11, -2, 3, 25, 245, 97, 143, 15, 0, 7, 65, 53, 1089, 163, 255, 17, -6, 27, 31, 301, 133, 1859, 253, 323, 21, -4, 5, 375, 73, 1067, 185, 4335, 355, 483, 27, -2, 9, 91, 1715, 151, 2119, 313, 6137, 565, 783, 29, -8, 9, 125, 473, 11979, 229, 4301, 457, 11109, 781, 899, 35
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Comments

Each column is strictly increasing.

Examples

			The top left corner of the array:
k=  |  1    2    3      4    5      6    7       8      9     10   11      12
2k= |  2    4    6      8   10     12   14      16     18     20   22      24
----+-------------------------------------------------------------------------
  1 |  0,   0,  -2,     0,  -2,    -4,  -2,      0,    -6,    -4,  -2,     -8,
  2 |  1,   3,   1,     9,   3,     3,   7,     27,     5,     9,   9,      9,
  3 |  3,  15,  13,    75,  25,    65,  31,    375,    91,   125,  43,    325,
  4 |  5,  35,  43,   245,  53,   301,  73,   1715,   473,   371,  83,   2107,
  5 |  9,  99,  97,  1089, 133,  1067, 151,  11979,  1261,  1463, 187,  11737,
  6 | 11, 143, 163,  1859, 185,  2119, 229,  24167,  2771,  2405, 295,  27547,
  7 | 15, 255, 253,  4335, 313,  4301, 403,  73695,  4807,  5321, 433,  73117,
  8 | 17, 323, 355,  6137, 457,  6745, 491, 116603,  8165,  8683, 593, 128155,
  9 | 21, 483, 565, 11109, 607, 12995, 733, 255507, 16385, 13961, 817, 298885,
		

Crossrefs

Cf. A040976 (column 1), A378986 (row 1).
Cf. also A378979.

Programs

  • PARI
    up_to = 11325; \\ = binomial(150+1,2)
    A083254(n) = (2*eulerphi(n)-n);
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A379011sq(row,col) = A083254(A246278sq(row,col));
    A379011list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A379011sq(col,(a-(col-1))))); (v); };
    v379011 = A379011list(up_to);
    A379011(n) = v379011[n];

Formula

A(n, k) = 2*A379010(n, k) - A246278(n, k).

A060881 n-th primorial (A002110) + prime(n + 1).

Original entry on oeis.org

3, 5, 11, 37, 221, 2323, 30047, 510529, 9699713, 223092899, 6469693261, 200560490167, 7420738134851, 304250263527253, 13082761331670077, 614889782588491463, 32589158477190044789, 1922760350154212639131
Offset: 0

Views

Author

N. J. A. Sloane, May 05 2001

Keywords

Comments

Terms are pairwise coprime with very high probability. I didn't find terms which are pairwise noncoprime, although it may be a case of the "strong law of small numbers." - Daniel Forgues, Apr 23 2012
All numbers in the range [primorial(n)+2, a(n)-1] are guaranteed to be a multiple of a prime p whose index is <= n. There are prime(n+1)-2 = A040976(n+1) such numbers. - Jamie Morken and Michel Marcus, Feb 01 2018

Examples

			a(2) = 2*3 + 5 = 11.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(ithprime(k), k=1..n)+ithprime(n+1): seq(a(n), n=0..20);  # Muniru A Asiru, Feb 01 2018
  • Mathematica
    Module[{nn=20,pr},pr=Prime[Range[nn+1]];Join[{3},FoldList[ Times,Most[ pr]] + Rest[pr]]] (* Harvey P. Dale, Feb 19 2016 *)
    Total /@ Fold[Append[#1, {Prime[#2] #1[[-1, 1]], Prime[#2 + 1]}] &, {{1, 2}}, Range@ 17] (* Michael De Vlieger, Feb 21 2018 *)
  • PARI
    { n=-1; m=1; forprime (p=2, prime(101), write("b060881.txt", n++, " ", m + p); m*=p; ) } \\ Harry J. Smith, Jul 19 2009
    
  • PARI
    a(n) = prod(i=1, n, prime(i)) + prime(n+1); \\ Michel Marcus, Feb 01 2018

Formula

a(n) = A002110(n) + A000040(n+1). - Michel Marcus, Feb 01 2018

Extensions

Name changed by David A. Corneth, Mar 25 2018

A110146 a(n) = n^(n+1) mod (n+2).

Original entry on oeis.org

0, 1, 0, 1, 4, 1, 0, 4, 8, 1, 4, 1, 12, 4, 0, 1, 4, 1, 12, 4, 20, 1, 16, 16, 24, 13, 20, 1, 28, 1, 0, 4, 32, 9, 4, 1, 36, 4, 32, 1, 10, 1, 36, 31, 44, 1, 16, 15, 38, 4, 44, 1, 40, 49, 40, 4, 56, 1, 52, 1, 60, 4, 0, 16, 34, 1, 60, 4, 48, 1, 40, 1, 72, 34, 68, 9
Offset: 0

Views

Author

Zak Seidov, Jul 14 2005

Keywords

Comments

First occurrence of n such that n^(n+1) (mod n+2) == k for k = 1, 2, 3, ..., or 0 if no such n is known: 1, 20735, 10667, 4, 0, 3761, 3820819, 8, 33, 40, 350849481, 12, 25, ..., .
Congruences not yet occurring for n < 4.6*10^9: 5, 47, 57, 105, 203, 233, 255, 293, 333, 354, 377, 405, 433, ..., .

Crossrefs

Programs

  • Mathematica
    Table[PowerMod[n, n+1, n+2], {n, 0, 120}]
  • PARI
    a(n) = lift(Mod(n, n+2)^(n+1)); \\ Michel Marcus, Dec 17 2022

Formula

a(A000918(n)) = 0 for n >= 1, a(A040976(n)) = 1 for n >= 2.
a(n-2) = A062173(n) if n is odd or n is power of two, and a(n-2) = n - A062173(n) otherwise. - Thomas Ordowski, Nov 28 2013

A120632 Number of numbers >1 up to 2*prime(n) which are divisible by primes up to prime(n).

Original entry on oeis.org

2, 4, 8, 11, 18, 22, 29, 33, 40, 51, 54, 64, 72, 76, 84, 94, 104, 109, 120, 127, 132, 142, 150, 161, 174, 181, 186, 194, 199, 207, 230, 238, 248, 252, 270, 275, 285, 297, 305, 317, 327, 331, 349, 353, 361, 365, 386, 407, 415, 419, 426, 438, 442, 460, 471, 482
Offset: 1

Views

Author

Lekraj Beedassy, Jun 21 2006

Keywords

Comments

The first prime(n+1)-2 numbers >1 are divisible by primes up to prime(n).
Complement of A137624; A137621(a(n))=A000040(n); A137621(a(n)+1)=A100484(n). - Reinhard Zumkeller, Jan 30 2008

Examples

			a(4)=11 because exactly 11 numbers between 2 and 2*prime(4)=2*7=14, namely: 2,3,4,5,6,7,8,9,10,12,14 are divisible by the first four primes 2,3,5,7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
       p:= ithprime(n); 2*p - numtheory:-pi(2*p)+n-1
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 02 2022
  • PARI
    a(n) = {nb = 0; for (i = 2, 2*prime(n), for (ip = 1, n, if ( !(i % prime(ip)), nb++; break;););); nb;} \\ Michel Marcus, Oct 26 2013

Formula

a(n) = A120633(n) + A040976(n+1) = A076274(n) - A070046(n).
Previous Showing 21-30 of 71 results. Next