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

A317830 Numerators of rational valued sequence whose Dirichlet convolution with itself yields A175851, the ordinal transform of the nextprime function, A151800.

Original entry on oeis.org

1, 1, 1, 7, 1, 3, 1, 9, 11, 7, 1, 3, 1, 3, 5, 171, 1, -1, 1, -5, 5, 7, 1, -1, 11, 7, 29, 35, 1, -7, 1, -41, 5, 7, 9, 93, 1, 3, 5, 11, 1, -3, 1, -5, 3, 7, 1, -61, 11, 7, 9, 27, 1, -29, 5, -1, 9, 11, 1, -29, 1, 3, 3, 771, 9, 9, 1, -5, 5, -3, 1, -73, 1, 3, 3, 19, 9, 9, 1, -141, -45, 7, 1, -53, 5, 7, 9, 43, 1, -63, 5, 11, 9, 11, 13, 1597, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Crossrefs

Cf. A151800, A175851, A046644 (denominators).

Programs

  • Mathematica
    A175851[n_] := If[!CompositeQ[n], 1, n - NextPrime[n, -1] + 1];
    f[n_] := f[n] = If[n == 1, 1, (1/2)(A175851[n] - Sum[If[1 < d < n, f[d]* f[n/d], 0], {d, Divisors[n]}])];
    a[n_] := Numerator[f[n]];
    Array[a, 100] (* Jean-François Alcover, Dec 19 2021 *)
  • PARI
    A175851(n) = if(1==n,n,1 + n - precprime(n));
    A317830aux(n) = if(1==n,n,(A175851(n)-sumdiv(n,d,if((d>1)&&(dA317830aux(d)*A317830aux(n/d),0)))/2);
    A317830(n) = numerator(A317830aux(n));
    
  • PARI
    \\ Memoized implementation:
    memo317830 = Map();
    A317830aux(n) = if(1==n,n,if(mapisdefined(memo317830,n),mapget(memo317830,n),my(v = (A175851(n)-sumdiv(n,d,if((d>1)&&(dA317830aux(d)*A317830aux(n/d),0)))/2); mapput(memo317830,n,v); (v)));

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A175851(n) - Sum_{d|n, d>1, d 1.

A286181 Lesser of Wilson's pseudo-twin primes: primes p such that p! == 1 (mod q), where q=A151800(p) is the next prime after p, and q-p>2.

Original entry on oeis.org

7841, 594278556271608991, 4259842839142238791410741595983041626644087433
Offset: 1

Views

Author

Max Alekseyev and Thomas Ordowski, May 04 2017

Keywords

Comments

By Wilson's theorem, p! == 1 (mod p+2) whenever p,p+2 are twin primes. This sequence and A286208 concern consecutive primes p,q satisfying p! = 1 (mod q), where d = q-p > 2.
It follows that (d-1)! == 1 (mod q), and so q divides A033312(d-1).
Listed terms correspond to d = 12, 30, 76 (cf. A286230). Further terms should have d>=140.
Also, primes p=prime(n) such that A275111(n)=1, and (prime(n),prime(n+1)) are not twin primes (i.e., p is not a term of A001359).

Examples

			For a(1)=7841, we have 7841! == 1 (mod 7853), where 7841 and 7853=7841+12 are consecutive primes. Also, 7853 | (12-1)!-1.
		

Crossrefs

A339903 Fully multiplicative with a(p) = A000265(q-1), where q = A151800(p), the next prime > p.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 5, 3, 1, 9, 1, 11, 3, 5, 3, 7, 1, 9, 1, 1, 5, 15, 3, 9, 1, 3, 9, 15, 1, 5, 11, 1, 3, 21, 5, 23, 3, 3, 7, 13, 1, 25, 9, 9, 1, 29, 1, 9, 5, 11, 15, 15, 3, 33, 9, 5, 1, 3, 3, 35, 9, 7, 15, 9, 1, 39, 5, 9, 11, 15, 1, 41, 3, 1, 21, 11, 5, 27, 23, 15, 3, 3, 3, 5, 7, 9, 13, 33, 1, 25, 25
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2020

Keywords

Crossrefs

Programs

  • PARI
    A000265(n) = (n>>valuation(n,2));
    A339903(n) = if(1==n,n,my(f=factor(n)); for(i=1,#f~,f[i,1] = nextprime(1+f[i,1])-1); A000265(factorback(f)));

Formula

For all squarefree numbers k, a(k) = A339904(k).

A249624 Numbers n such that the sum of n and the least prime>n (A151800(n)) is prime.

Original entry on oeis.org

0, 1, 2, 6, 8, 14, 18, 20, 24, 30, 34, 36, 38, 48, 50, 54, 64, 68, 78, 80, 84, 94, 96, 98, 104, 110, 114, 124, 132, 134, 138, 144, 154, 156, 164, 174, 182, 188, 198, 208, 210, 216, 220, 228, 230, 248, 252, 258, 260, 270, 284, 294, 300, 306, 308, 314, 322, 328, 330, 336, 344, 360
Offset: 1

Views

Author

Antonio Roldán, Dec 03 2014

Keywords

Examples

			50 is in the sequence because A151800(50)=53, and 50+53=103 is prime.
		

Crossrefs

Programs

  • PARI
    {for(i=0,10^3,k=i+nextprime(i+1);if(isprime(k),print1(i,", ")))}

A249676 Terms k of A249667 such that k-A151799(k) = A151800(k)-k.

Original entry on oeis.org

6, 30, 50, 144, 300, 560, 610, 650, 660, 714, 780, 810, 816, 870, 1120, 1176, 1190, 1806, 2130, 2470, 2490, 2550, 2922, 3030, 3240, 3330, 3390, 3480, 3600, 3620, 3840, 4266, 4368, 5796, 5850, 6270, 6786, 6954, 7074, 7710, 8280, 9400, 9990, 10146, 10350, 10380, 10530, 10660, 11064
Offset: 1

Views

Author

Antonio Roldán, Dec 03 2014

Keywords

Examples

			610 is in A249667: the least prime>610 is 613, and 610+613=1223 is prime; the largest prime<610 is 607, and 610+607=1217 is prime. Also, 613-610=610-607=3, then 610 is in the current sequence.
		

Crossrefs

Programs

  • PARI
    {for(i=3,2*10^4,m=nextprime(i+1);k=i+m;n=precprime(i-1);q=i+n;if(isprime(k)&&isprime(q)&&m-i==i-n,print1(i,", ")))}

A340707 a(n) = (prevprime(2^n) + nextprime(2^n))/2 - 2^n where prevprime(n) = A151799(n) and nextprime(n) = A151800(n).

Original entry on oeis.org

0, 1, -1, 2, 0, 1, -2, 3, 2, -2, 0, 8, 12, -8, -7, 14, -1, 10, 2, 4, 6, -3, 20, -2, 5, -5, -27, 4, -16, 5, 5, 4, -8, 11, 13, -8, -19, 8, -36, 3, 2, -14, -5, 2, -3, -55, -19, -6, 14, -54, -13, -53, 63, -26, 38, -2, 21, 38, -30, 7, 39, 2, -23, 41, 2, -8, 5, 5, -5, -110
Offset: 2

Views

Author

Hugo Pfoertner, Jan 29 2021

Keywords

Comments

a(n) > 0 if the difference nextprime(2^n) - 2^n = A013597(n) is greater than the difference 2^n - previousprime(2^n) = A013603(n).

Examples

			a(4) = -1: 2^4 = 16, (13 + 17 - 32)/2 = -1;
a(5) = 2: 2^5 = 32, (31 + 37 - 64)/2 = 2;
a(6) = 0: 2^6 = 64, (61 + 67 - 128)/2 = 0.
		

Crossrefs

Programs

  • Maple
    a:= (p-> (nextprime(p)+prevprime(p))/2-p)(2^n):
    seq(a(n), n=2..75);  # Alois P. Heinz, Jan 29 2021
  • Mathematica
    Array[(NextPrime[2^#] + NextPrime[2^#, -1] - 2^(# + 1))/2 &, 60, 2] (* Michael De Vlieger, Aug 07 2022 *)
  • PARI
    for(k=2,71,my(p2=2^k,pp=precprime(p2),pn=nextprime(p2));if(print1((pp+pn-2*p2)/2", ")))

Formula

a(n) = (A013597(n) - A013603(n))/2.
a(A226178(n)) = 0.

Extensions

Name made more precise by Peter Luschny, Aug 08 2022

A357363 Primes p such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where q = A151800(A151800(p)).

Original entry on oeis.org

5, 19, 263, 1667
Offset: 1

Views

Author

Felix Fröhlich, Sep 25 2022

Keywords

Crossrefs

Programs

  • PARI
    is(n) = my(b=precprime(precprime(n-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
    forprime(p=5, , if(is(p), print1(p, ", ")))

A357364 Primes p such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where q = A151800(A151800(A151800(p))).

Original entry on oeis.org

11, 23, 41, 107, 389, 1987673, 35603983
Offset: 1

Views

Author

Felix Fröhlich, Sep 25 2022

Keywords

Crossrefs

Programs

  • PARI
    is(n) = my(b=precprime(precprime(precprime(n-1)-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
    forprime(p=7, , if(is(p), print1(p, ", ")))

A087032 a(n) = 1 if 2*A151800(n) - n is prime, otherwise 0, where A151800(n) is the smallest prime > n.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Zak Seidov, Jul 31 2003

Keywords

Comments

There is no subsequence of two ones; number of zeros in each group is odd, see A087033.

Examples

			a(1)=1 because the smallest prime > 1 is 2 and 2*2-1=3 is prime.
		

Crossrefs

Programs

  • Mathematica
    bb={}; Do[bb={bb, If[PrimeQ[2(Prime[PrimePi[n]+1])-n], 1, 0]}, {n, 1000}]; Flatten[bb]
  • PARI
    A087032(n) = isprime((2*nextprime(1+n))-n); \\ Antti Karttunen, Oct 09 2018

Formula

a(n) = 1 if A087030(n) is prime, 0 if it is composite.
a(n) = A010051((2*A151800(n))-n). - Antti Karttunen, Oct 09 2018

Extensions

Definition edited by Antti Karttunen, Oct 09 2018

A132403 Triangle read by rows: T(n,k) = nextprime( T(n-1,k) + T(n-1,k-1) ), where nextprime = A151800.

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 5, 11, 11, 5, 7, 17, 23, 17, 7, 11, 29, 41, 41, 29, 11, 13, 41, 71, 83, 71, 41, 13, 17, 59, 113, 157, 157, 113, 59, 17, 19, 79, 173, 271, 317, 271, 173, 79, 19, 23, 101, 257, 449, 593, 593, 449, 257, 101, 23, 29, 127, 359, 709, 1049, 1187, 1049, 709, 359, 127, 29
Offset: 0

Views

Author

Jonathan Vos Post, Nov 12 2007

Keywords

Comments

Each number is the smallest prime > the sum of the 2 numbers above (consider each line padded with 0 on each side).

Examples

			Triangle begins:
  1
  2....2
  3....5....3
  5...11...11....5
  7...17...23...17....7
  11..29...41...41...29...11
  13..41...71...83...71...41...13
  17..59..113..157..157..113...59...17
  19..79..173..271..317..271..173...79...19
  23.101..257..449..593..593..449..257..101...23
  29.127..359..709.1049.1187.1049..709..359..127..29
  31.157..487.1069.1759.2237.2237.1759.1069..487.157..31
  37.191..647.1559.2833.4001.4583.4001.2833.1559.647.191.37
  ...
First column is A008578.
Second column is A064337.
		

Crossrefs

Showing 1-10 of 263 results. Next