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.

A165562 Numbers n for which n+n' is prime, n' being the arithmetic derivative of n.

Original entry on oeis.org

2, 6, 10, 14, 15, 21, 26, 30, 33, 34, 35, 38, 42, 46, 51, 55, 57, 58, 65, 66, 74, 78, 85, 86, 93, 102, 110, 111, 118, 123, 141, 143, 145, 155, 158, 161, 166, 177, 178, 182, 185, 186, 194, 201, 203, 205, 206, 209, 210, 215, 221, 230, 246, 254, 258, 267, 278, 282, 290
Offset: 1

Views

Author

Keywords

Comments

The only prime in this sequence is 2. Since it is the only even prime and p' = 1, it is the only prime that added to its derivative can give an odd prime (namely 3).

Examples

			46 is in the list because: n=46 -> n'=25 -> n+n'=71 that is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    P:= proc(n)
    local a,i,p,pfs;
    for i from 1 to n do
    pfs:=ifactors(i)[2]; a:=i*add(op(2,p)/op(1,p),p=pfs);
    if isprime(a+i) then print(i); fi;
    od;
    end:
    P(1000);
    # alternative
    isA165562 := proc(n)
        isprime(A129283(n)) ;
    end proc:
    for n from 1 to 1000 do
        if isA165562(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 04 2022
  • Mathematica
    (*First run the program given in A003415*) A165562 = Select[ Range[ 1000 ], PrimeQ[ # + a[ # ] ] & ]
  • Python
    from sympy import isprime, factorint
    A165562 = [n for n in range(1,10**5) if isprime(n+sum([int(n*e/p) for p,e in factorint(n).items()]))] # Chai Wah Wu, Aug 21 2014

Extensions

Terms verified by Alonso del Arte, Oct 30 2009

A229269 Numbers k for which k - k' is prime, k' being the arithmetic derivative of k.

Original entry on oeis.org

3, 9, 10, 14, 15, 21, 26, 33, 35, 38, 39, 50, 51, 62, 65, 66, 69, 70, 77, 78, 86, 91, 93, 95, 102, 110, 111, 114, 122, 123, 129, 130, 133, 138, 146, 154, 159, 161, 170, 174, 190, 201, 203, 206, 209, 213, 215, 217, 218, 221, 222, 230, 238, 249, 258, 278, 282, 287
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Examples

			15 is in the list because 15’ = 8 and 15 - 8 = 7 that is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n,p; for n from 1 to q do
    a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]); if isprime(n-a) then print(n); fi; od; end: P(10^5);
  • Python
    from sympy import isprime, factorint
    A229269 = [n for n in range(1,10**4) if isprime(n-sum([int(n*e/p) for p,e in factorint(n).items()]))] # Chai Wah Wu, Aug 21 2014

A229270 Numbers k for which k' - k is prime, k' being the arithmetic derivative of k.

Original entry on oeis.org

18, 210, 315, 330, 390, 462, 510, 546, 690, 726, 798, 870, 930, 966, 1110, 1218, 1230, 1290, 1302, 1554, 1590, 1770, 2010, 2130, 2190, 2310, 2370, 2490, 2730, 2910, 3030, 3210, 3270, 3570, 3810, 4110, 4290, 4470, 4530, 4830, 4890, 5010, 5430, 5790, 5910, 5970
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Examples

			315 is in the list because 315’ = 318 and 318 - 315 = 3 that is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n,p; for n from 1 to q do
    a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]); if isprime(a-n) then print(n); fi; od; end: P(10^5);
  • Python
    from sympy import isprime, factorint
    A229270 = [n for n in range(1,10**5) if isprime(sum([int(n*e/p) for p,e in factorint(n).items()])-n)] # Chai Wah Wu, Aug 21 2014

A229272 Numbers n for which n' + n and n' - n are both prime, n' being the arithmetic derivative of n.

Original entry on oeis.org

210, 330, 390, 690, 798, 966, 1110, 1230, 2190, 2310, 2730, 3270, 4110, 4530, 4890, 5430, 6090, 6270, 6810, 6990, 7230, 7890, 8310, 8490, 9030, 9210, 9282, 10470, 10590, 10770, 12090, 12210, 12270, 12570, 12810, 12930, 13110, 13830, 14070, 17070, 17094, 17310
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Comments

Intersection of A165561 and A229270.

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n,p; for n from 1 to q do
    a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    if isprime(a+n) and isprime(a-n) then print(n); fi;
    od; end: P(10^5);
  • Python
    from sympy import isprime, factorint
    A229272 = []
    for n in range(1, 10**5):
        np = sum([int(n*e/p) for p, e in factorint(n).items()]) if n > 1 else 0
        if isprime(np+n) and isprime(np-n):
            A229272.append(n)
    # Chai Wah Wu, Aug 21 2014

A229271 Numbers k for which k + k' and k - k' are both prime, k' being the arithmetic derivative of k.

Original entry on oeis.org

10, 14, 15, 21, 26, 33, 35, 38, 51, 65, 66, 78, 86, 93, 102, 110, 111, 123, 161, 201, 203, 206, 209, 215, 221, 230, 258, 278, 282, 321, 371, 374, 395, 398, 402, 413, 438, 470, 471, 485, 530, 533, 543, 545, 551, 590, 626, 671, 678, 698, 723, 755, 779, 803, 815
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Comments

Intersection of A165561 and A229269.

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n,p; for n from 1 to q do
    a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    if isprime(n+a) and isprime(n-a) then print(n); fi;
    od; end: P(10^5);

A188145 Solutions of the equation n" - n' - n = 0, where n' and n" are the first and second arithmetic derivatives (see A003415).

Original entry on oeis.org

0, 20, 135, 164, 1107, 15625, 43692, 128125, 188228, 294921, 1270539, 4117715, 33765263, 34134375, 147053125, 8995560189, 19348535652, 38753462951
Offset: 1

Views

Author

Paolo P. Lava, Mar 22 2011

Keywords

Comments

Solutions of the similar equation n”-n’+n=0 are 30, 858, 1722, etc., apparently Giuga numbers whose derivative is a prime number. In fact the equation can be rewritten as n'=n+n" and if n"=1 it is the conjecture in A007850.
a(16) > 2*10^9. - Donovan Johnson, Apr 30 2011
a(19) > 10^11. - Giovanni Resta, Jun 04 2016

Examples

			n=20, n’=24, n”=44 -> 44-24-20=0;  n=135, n’=162, n”=297 -> 297-162-135=0
		

Crossrefs

Programs

  • Haskell
    import Data.List (zipWith3, elemIndices)
    a188145 n = a188145_list !! (n-1)
    a188145_list = elemIndices 0 $ zipWith3 (\x y z -> x - y - z)
       (map a003415 a003415_list) a003415_list [0..]
    -- Reinhard Zumkeller, May 10 2011
  • Maple
    readlib(ifactors):
    Der:= proc(n)
    local a,b,i,p,pfs;
    for i from 0 to n do
      if i<=1 then a:=0;
      else pfs:=ifactors(i)[2]; a:=i*add(op(2,p)/op(1,p),p=pfs) ;
      fi;
      if a<=1 then b:=0;
      else pfs:=ifactors(a)[2]; b:=a*add(op(2,p)/op(1,p),p=pfs) ;
      fi;
      if b-a=i then lprint(i,a,b); fi;
    od
    end:
    Der(10000000);

Extensions

a(13)-a(15) from Donovan Johnson, Apr 30 2011
Corrected a(9) and a(16)-a(18) from Giovanni Resta, Jun 04 2016
Showing 1-6 of 6 results.