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.

A246626 a(1)=1, a(n+1) is the smallest number m such that A244447(a(n)) < A244447(m).

Original entry on oeis.org

1, 3, 4, 44, 84, 304, 1236, 7144, 7628, 11502, 12732
Offset: 1

Views

Author

Keywords

Comments

A246627 is the related subsequence of A244447 that gives A244447(a(n)).

Examples

			a(4)=44 because 44 is the smallest number m such that
A244447(a(3)) < A244447(m), where a(3)=4, A244447(4)=37350 and A244447(44)=40878.
		

Crossrefs

A246627 a(n) = A244447(A246626(n)).

Original entry on oeis.org

11, 13, 37350, 40878, 77565, 2419530, 5311238, 5893650, 6809166, 12387704, 98376110
Offset: 1

Views

Author

Keywords

Examples

			A244447(A246626(1)) = A244447(1) = 11.
A244447(A246626(4)) = A244447(44) = 40878.
A244447(A246626(6)) = A244447(304) = 2419530.
		

Crossrefs

A087711 a(n) = smallest number k such that both k-n and k+n are primes.

Original entry on oeis.org

2, 4, 5, 8, 7, 8, 11, 10, 11, 14, 13, 18, 17, 16, 17, 22, 21, 20, 23, 22, 23, 26, 25, 30, 29, 28, 33, 32, 31, 32, 37, 36, 35, 38, 37, 38, 43, 42, 41, 44, 43, 48, 47, 46, 57, 52, 51, 50, 53, 52, 53, 56, 55, 56, 59, 58, 75, 70, 69, 72, 67, 66, 65, 68, 67, 72, 71, 70, 71, 80, 81, 78
Offset: 0

Views

Author

Zak Seidov, Sep 28 2003

Keywords

Comments

Let b(n), c(n) and d(n) be respectively, smallest number m such that phi(m-n) + sigma(m+n) = 2n, smallest number m such that phi(m+n) + sigma(m-n) = 2n and smallest number m such that phi(m-n) + sigma(m+n) = phi(m+n) + sigma(m-n), we conjecture that for each positive integer n, a(n)=b(n)=c(n)=d(n). Namely we conjecture that for each positive integer n, a(n) < A244446(n), a(n) < A244447(n) and a(n) < A244448(n). - Jahangeer Kholdi and Farideh Firoozbakht, Sep 05 2014

Examples

			n=10: k=13 because 13-10 and 13+10 are both prime and 13 is the smallest k such that k +/- 10 are both prime
4-1=3, prime, 4+1=5, prime; 5-2=3, 5+2=7; 8-3=5, 8+3=11; 9-4=5, 9+4=13, ...
		

Crossrefs

Programs

  • Magma
    distance:=function(n); k:=n+2; while not IsPrime(k-n) or not IsPrime(k+n) do k:=k+1; end while; return k; end function; [ distance(n): n in [1..71] ]; /* Klaus Brockhaus, Apr 08 2007 */
    
  • Maple
    Primes:= select(isprime,{seq(2*i+1,i=1..10^3)}):
    a[0]:= 2:
    for n from 1 do
      Q:= Primes intersect map(t -> t-2*n,Primes);
      if nops(Q) = 0 then break fi;
      a[n]:= min(Q) + n;
    od:
    seq(a[i],i=0..n-1); # Robert Israel, Sep 08 2014
  • Mathematica
    s = ""; k = 0; For[i = 3, i < 22^2, If[PrimeQ[i - k] && PrimeQ[i + k], s = s <> ToString[i] <> ","; k++ ]; i++ ]; Print[s] (* Vladimir Joseph Stephan Orlovsky, Apr 03 2008 *)
    snk[n_]:=Module[{k=n+1},While[!PrimeQ[k+n]||!PrimeQ[k-n],k++];k]; Array[ snk,80,0] (* Harvey P. Dale, Dec 13 2020 *)
  • PARI
    a(n)=my(k);while(!isprime(k-n) || !isprime(k+n),k++);return(k) \\ Edward Jiang, Sep 05 2014

Formula

a(n) = A020483(n)+n for n >= 1. - Robert Israel, Sep 08 2014

Extensions

Entries checked by Klaus Brockhaus, Apr 08 2007

A244448 a(n) is the smallest integer m such that m-n is composite and phi(m-n) + sigma(m+n) = phi(m+n) + sigma(m-n).

Original entry on oeis.org

4, 153, 442, 213, 179, 120, 46, 37, 47, 264, 145416, 1101, 107, 79, 71, 78, 716, 637, 98, 249, 71, 126, 13258, 1243, 119, 163, 119, 131, 140497, 381, 191, 156, 101, 169, 1574, 315, 151, 193, 167, 2158, 148, 104, 202, 289, 1969, 882, 2572, 428, 251, 357, 314, 283
Offset: 0

Views

Author

Keywords

Comments

For each n, a(n) > n and like a(n)-n, a(n)+n is also composite.
If both numbers p and p + 2n are primes then x = p+n is a solution to the equation phi(x-n) + sigma(x+n) = phi(x+n) + sigma(x-n). But for these many solutions x, both numbers x-n and x+n are primes.
a(n) is the smallest integer m such that m-n is composite and A051612(m+n) = A051612(m-n) where A051612(n) = sigma(n) - phi(n). - Michel Marcus, Mar 20 2020

Examples

			a(1)=153 because 153-1 is composite, phi(153-1)+sigma(153+1) = phi(153+1)+sigma(153-1) and there is no such number less than 153.
		

Crossrefs

Cf. A000010 (phi), A000203 (sigma), A051612 (sigma - phi).

Programs

  • Mathematica
    a[0]=4;a[n_]:=a[n]=(For[m=n+1,PrimeQ[m-n]||EulerPhi[m-n]+DivisorSigma[1,m+n]!=EulerPhi[m+n]+DivisorSigma[1,m-n],m++];m);
    Table[a[n],{n,0,70}]
  • PARI
    a(n) = {my(m=n+4); while(isprime(m-n) || eulerphi(m+n)+sigma(m-n)!=eulerphi(m-n)+sigma(m+n), m++); m; }
    vector(100,n,a(n)) \\ Derek Orr, Aug 30 2014

A244446 a(n) is the smallest integer m such that m-n is composite and phi(m-n) + sigma(m+n) = 2*m.

Original entry on oeis.org

25, 323, 48, 34, 53, 471, 58, 78, 84, 76, 71, 122, 64, 144, 162, 118, 74, 188, 106, 258, 156, 2512, 68, 254, 94, 107, 132, 2326, 876, 536, 154, 182, 268, 468, 98, 2061, 106, 408, 264, 286, 258, 1520900, 423, 618, 276, 648, 579, 518, 204, 708, 196, 370, 164, 1088, 300, 1518, 412, 3616, 158, 1226
Offset: 1

Views

Author

Keywords

Comments

For each n, a(n)>n and like a(n)-n, a(n)+n is also composite.
If both numbers p & p+2n are primes the x=p+n is a solution for the equation phi(x-n)+sigma(x+n)=2x. But for these many solutions x, both x-n & x+n are primes.

Examples

			a(1)=25 because 25-1 is composite, phi(25-1)+sigma(25+1)=2*25 and there is no such number less than 25.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(For[m=n+1, PrimeQ[m-n]||EulerPhi[m-n]+DivisorSigma[1,m+n]!=2m,m++];m);Table[a[n],{n,60}]
  • PARI
    a(n)=m=n+4;while(isprime(m-n)||eulerphi(m-n)+sigma(m+n)!=2*m,m++);m
    vector(100,n,a(n)) \\ Derek Orr, Aug 30 2014
Showing 1-5 of 5 results.