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

A020483 Least prime p such that p+2n is also prime.

Original entry on oeis.org

2, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 7, 5, 3, 3, 7, 5, 3, 5, 3, 3, 5, 3, 7, 5, 3, 7, 5, 3, 3, 7, 5, 3, 5, 3, 3, 7, 5, 3, 5, 3, 7, 5, 3, 13, 7, 5, 3, 5, 3, 3, 5, 3, 3, 5, 3, 19, 13, 11, 13, 7, 5, 3, 5, 3, 7, 5, 3, 3, 11, 11, 7, 5, 3, 3, 7, 5, 3, 7, 5, 3, 5, 3, 7, 5, 3, 7, 5, 3, 3, 11, 11, 7, 5, 3, 3, 5, 3, 3, 13, 11, 31, 7
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that a(n) always exists. a(n) has been computed for n < 5 * 10^11, with largest value a(248281210271) = 3307. - Jens Kruse Andersen, Nov 28 2004
If a(n) = a(n+1) = k, then 2*n + k and 2*(n+1) + k are twin primes. - Ya-Ping Lu, Sep 22 2020

Examples

			Given n = 2, we see that 2 + 2n = 6 = 2 * 3, but 3 + 2n = 7, which is prime, so a(2) = 3.
Given n = 3, we see that 2 + 2n = 8 = 2^3 and 3 + 2n = 9 = 3^2, but 5 + 2n = 11, which is prime, so a(3) = 5.
		

Crossrefs

Cf. A101045, A239392 (record values).
It is likely that A054906 is an identical sequence, although this seems to have not yet been proved. - N. J. A. Sloane, Feb 06 2017

Programs

  • GAP
    P:=Filtered([1..10000],IsPrime);;
    a:=List(List([0..110],n->Filtered(P,i->IsPrime(i+2*n))),Minimum); # Muniru A Asiru, Mar 26 2018
  • Haskell
    a020483 n = head [p | p <- a000040_list, a010051' (p + 2 * n) == 1]
    -- Reinhard Zumkeller, Nov 29 2014
    
  • Maple
    A020483 := proc(n)
        local p;
        p := 2;
        while true do
            if isprime(p+2*n) then
                return p;
            end if;
            p := nextprime(p) ;
        end do:
    end proc:
    seq(A020483(n),n=0..40); # R. J. Mathar, Sep 23 2016
  • Mathematica
    Table[j = 1; found = False; While[!found, j++; found = PrimeQ[Prime[j] + 2i]]; Prime[j], {i, 200}]
    leastPrimep2n[n_] := Block[{k = 1, p, q = 2 n}, While[p = Prime@k; !PrimeQ[p + q], k++]; p]; Array[leastPrimep2n, 102] (* Robert G. Wilson v, Mar 26 2008 *)
  • PARI
    a(n)=forprime(p=2,,if(isprime(p+2*n), return(p))) \\ Charles R Greathouse IV, Mar 19 2014
    

Formula

If a(n) exists, a(n) < 2n, which of course is a great overestimate. - T. D. Noe, Jul 16 2002
a(n) = A087711(n) - n. - Zak Seidov, Nov 28 2007
a(n) = A020484(n) - 2n. - Zak Seidov, May 29 2014
a(n) = 2 if and only if n = 0. - Alonso del Arte, Mar 14 2018

Extensions

a(0)=2 added by N. J. A. Sloane, Apr 25 2015

A015886 a(n) = smallest number k such that sigma(k + n) = sigma(k) + n, or -1 if no such number exists.

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 5, 74, 3, 2, 3, 2, 5, 4418, 3, 2, 3, 2, 5, 6, 3, 2, 7
Offset: 0

Views

Author

Keywords

Comments

There are solutions to sigma(k)+n=sigma(k+n) whenever n is the difference between two primes (A030173), e.g. k and k+n are primes. There are other values of n that have solutions (see example).
a(23) > 4292000000, if it exists. - Jud McCranie, Jan 05 2000
The sequence begins: 1, 2, 3, 2, 3, 2, 5, 74, 3, 2, 3, 2, 5, 4418, 3, 2, 3, 2, 5, 6, 3, 2, 7, ?, 5, ?, 3, 2, 3, 2, 7, ?, 5, 18, 3, 2, 5, 44, 3, 2, 3, 2, 5, ?, 3, 2, 7, ?, 5, 3315, 3, 2, 7, ?, 5, ?, 3, 2, 3, 2, 7, ?, 5, ?, 3, 2, 5, ?, 3, 2, 3, 2, 7, 18, 5, ?, 3, 2, 5, ?, 3, 2, 7, ?, 5, ?, 3, 2, 13, ?, 7, ?, 5, 32, 3, 2, 5 where the other missing terms (designated by "?") are > 10^9, if they exist. - Jud McCranie, Jan 08 2000
The "other" values of n are the odd n such that n+2 is not prime. For these n, in order for sigma(k) or sigma(n+k) to be odd, either k or n+k must be a square or twice a square. Examples: for n=7, n+k=9^2; for n=13, k=2*47^2 and for n=19, n+k=5^2. Using this idea, it is easy to show that if a(23) exists it is greater than 10^12. - T. D. Noe, Sep 24 2007

Examples

			sigma(74+7) = 121 = sigma(74)+7, so a(7) = 74.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1; While[DivisorSigma[1,k+n] != DivisorSigma[1,k]+n, k++ ]; k, {n,0,22}] (* T. D. Noe, Sep 24 2007 *)
  • PARI
    a(n) = {my(k=1); while(sigma(k+n) != sigma(k) + n, k++); k;} \\ Michel Marcus, May 23 2018

Formula

a(2n) = A020483(n) = A054906(n) - T. D. Noe, Sep 24 2007

A055458 a(n) = smallest composite solution x to the equation phi(x+2n) = phi(x)+2n.

Original entry on oeis.org

6, 12, 21, 24, 36, 45, 48, 39, 63, 72, 72, 95, 60, 57, 224, 84, 15, 135, 1058, 45, 301, 144
Offset: 1

Views

Author

Labos Elemer, Jun 26 2000

Keywords

Comments

Sivaramakrishnan (1989) quotes Makowski, who gave solutions for phi(x+d) = phi(x)+d with d = 2^a and d = 2*3^a. Compare also A007694 and A049237.
Smallest prime solutions appear to be identical with A054906.
a(23) is presently unknown.
The sequence continues as (with ? for unknown values): ?, 95, 162, 63, 189, 69, 156, 161, 180, 69, 260, 150, ?, 115, 204, 129, 400, 75, 180, 165, 35, 117, 476, 7105, 288, 195, ?, 324, 620, 240, 81, 145, 14531, 153, 644, 309, ?, 203, ?, 63, 640, 75, 372, 285, 2312, 33, 343, 642, 336, 155, ?, 147, 728, 396, 1564, 185, 564, 87, 567, 360, 360, 155, 492, 510, 560, 516, 516, 301, 4232, 261, 860, 387, 576, 185, 564, 309, 1000, 225 ... - Don Reble, Apr 29 2015

Examples

			a(19) = 1058 because phi(1058 + 38) = phi(1096) = 544 = 506 + 38 = phi(1058) + 38.
a(100) = 225, phi(225 + 200) = phi(425) = 320 = 120 + 200 = phi(225) + 200.
		

References

  • Sivaramakrishnan, R. (1989): Classical theory of Arithmetical Functions. Marcel Dekker, Inc., New York-Basel. Chapter V, Problem 20, page 113.

Crossrefs

Programs

  • Maple
    A055458 := proc(n)
        local x;
        for x from 0 do
            if not isprime(x) then
            if numtheory[phi](x+2*n) = numtheory[phi](x)+2*n then
                return x;
            end if;
            end if;
        end do:
    end proc: # R. J. Mathar, Sep 23 2016
  • Mathematica
    Table[k = 4; While[Nand[CompositeQ@ k, EulerPhi[k + 2 n] == EulerPhi[k] + 2 n], k++]; k, {n, 22}] (* Michael De Vlieger, Dec 17 2016 *)
  • PARI
    a(n)=forcomposite(x=4,, if(eulerphi(x+2*n) == eulerphi(x)+2*n, return(x))) \\ does not handle -1s; Charles R Greathouse IV, Apr 28 2015

Extensions

More terms from Michel ten Voorde Jun 14 2003
Entry revised by N. J. A. Sloane, Apr 28 2015

A084293 a(n) = 2n + A054905(n).

Original entry on oeis.org

436, 305635361, 110, 35, 195566, 77, 26, 55, 38, 76, 938, 104, 212308, 85, 74, 106677, 86, 161
Offset: 1

Views

Author

Labos Elemer, May 26 2003

Keywords

Comments

The sequence begins 436, 305635361, 110, 35, 195566, 77, 26, 55, 38, 76, 938, 104, 212308, 85, 74, 106677, 86, 161, ?, 91, 87, 92, 122, 111, 1585396, 145, 94, 76627, 10283, 159, 772, 133, 122, 412, 194, 142, 964, 205, 374, 925, 6725, 209, ?, 1015, 178, ?, ?, 206, 146, ?, ..., where the other missing terms (designated by "?") are unknown, if they exist (see also A206768).

Examples

			To terms of A054905, where sigma(x+2n)=sigma(x)+2n replacing x+2n=y,x=y-2n, we get sigma(y)-2n=sigma(y-2n);
For several analogous sequences, the corresponding "mirror-solutions" can be easily constructed. See: e.g. A015913-A015918; A050507, A054799, A054903-A054906; A054982-A054987; A059118; A055009, A055458, A063500, etc.
		

Crossrefs

Cf. A054905.

Formula

Composite x satisfying sigma(x-2n) = sigma(x) - 2n.

A084292 a(n) = 6n + A054904(n).

Original entry on oeis.org

110, 77, 38, 104, 74, 161, 87, 111, 94, 159, 122, 142, 374, 209, 178, 206, 206, 253, 326, 302, 206, 302, 471, 249, 519, 341, 346, 303, 354, 481, 542, 377, 2057, 533, 386, 411, 5138, 662, 846, 527, 386, 437, 1034, 519, 794, 689, 626, 493, 566, 629, 873, 527, 638
Offset: 1

Views

Author

Labos Elemer, May 26 2003

Keywords

Comments

Composite solutions y to sigma(y-6n) = sigma(y) - 6n. For terms x of A054904, where sigma(x+6n) = sigma(x) + 6n, replacing x+6n = y, x = y-6n, we get sigma(y) - 6n = sigma(y-6n).

Crossrefs

Cf. A000203 (sigma), A054904, A084293.
For several analogous sequences such corresponding "mirror-solutions" can be easily constructed. See, e.g., A015913-A015918, A050507, A054799, A054903-A054906, A054982-A054987, A059118, A055009, A055458, A063500, etc.

A206770 Smallest number k such that sigma(k-2*n)=sigma(k)-2*n.

Original entry on oeis.org

5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 29, 29, 21, 31, 37, 37, 37, 41, 28, 33, 47, 47, 53, 53, 53, 59, 59, 44, 61, 67, 67, 67, 71, 57, 73, 79, 79, 79, 83, 83, 69, 89, 74, 101, 68, 97, 97, 85, 101, 103, 107, 107, 109, 113, 93, 131, 127, 127, 131, 127, 127, 127
Offset: 1

Views

Author

Paolo P. Lava, Jan 10 2013

Keywords

Comments

Note all k>=1 are considered, even if k-2n<0. If the search space is k>=2n, variants of A020484 and A060264 appear. - R. J. Mathar, Jan 12 2013

Examples

			a(15)=37 because 37 is the minimum number for which sigma(37-2*15)=sigma(7)=8 and sigma(37)-2*15=38-30=8.
		

Crossrefs

Programs

  • Maple
    A206770:=proc(q)
    local k,n;
    for n from 1 to q do
    for k from 1 to q do
      if sigma(k-2*n)=sigma(k)-2*n then print(k); break; fi;
    od; od; end:
    A206770(1000000000);
    A206770 := proc(n)
        local k ;
        for k from 1 do
            if numtheory[sigma](k-2*n) = numtheory[sigma](k)-2*n then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Jan 12 2013
Showing 1-6 of 6 results.