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

A251860 Numbers n = concat(s,t) such that n = prime(s) + prime(t).

Original entry on oeis.org

254, 64581, 64582, 64611, 64612, 64626, 64676, 64698, 64706, 64711, 64712, 64724, 2159962, 3232398, 1998135468, 11520892878, 17788754556
Offset: 1

Views

Author

Paolo P. Lava, Dec 10 2014

Keywords

Comments

If we consider the product instead of the sum, n = concat(s,t) = prime(s) * prime(t), then the first terms are 14 and 2127. In fact:
14 = concat(1,4) and prime(1) * prime(4) = 2 * 7 = 14.
2127 = concat(2,127) and prime(2) * prime(127) = 3 * 709 = 2127.
a(18) > 8*10^10. - Giovanni Resta, May 26 2015

Examples

			254 = concat(2,54) and prime(2) + prime(54) = 3 + 251 = 254.
64581 = concat(6458,1) and prime(6458) + prime(1) = 64579 + 2 = 64581.
64582 = concat(6458,2) and prime(6458) + prime(2) = 64579 + 3 = 64582. Etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory):P:=proc(q) local s,t,k,n;
    for n from 1 to q do for k from 1 to ilog10(n) do s:=n mod 10^k; t:=trunc(n/10^k); if s*t>0 then if ithprime(s)+ithprime(t)=n
    then print(n); break; fi; fi; od; od; end: P(10^6);
    # program from R. J. Mathar, Jan 22 2015:
    isA251860 := proc(n)
        local ti,i1,i2;
        if n >= 10 then
            for ti from 1 to A055642(n)-1 do
                i1 := modp(n,10^ti) ;
                i2 := floor(n/10^ti) ;
                if i1 > 0 and i2 > 0 then
                    if ithprime(i1)+ithprime(i2) = n then
                        return true;
                    end if;
                end if;
            end do:
            false;
        else
            false;
        end if;
    end proc:
    for n from 1 do
        if isA251860(n) then
            print(n);
        end if;
    end do:
  • PARI
    isok(n) = {my(nb = #Str(n)); for (k=1, nb-1, s = n\10^k; t = n % 10^k; if (s && t && prime(s)+ prime(t) == n, return (1));); return (0);} \\ Michel Marcus, Dec 10 2014

Formula

n = concat(s,t) = A000040(s) + A000040(t).

Extensions

a(13)-a(17) from Giovanni Resta, May 26 2015

A258319 Numbers n such that n = concat(a,b) and n = phi(n) + phi(a) + phi(b), with a>0 and b>0, where phi(n) is the Euler totient function of n.

Original entry on oeis.org

25, 177, 1177, 2501, 17105, 21337, 22681, 32581, 217009, 409501, 561601, 577501, 861841, 1025821, 1401841, 1738081, 2836465, 8331361, 10284193, 19971901, 20103001, 27835921, 31949921, 34897501, 100763053, 107314217, 111512701, 121806001, 150658561, 155874001
Offset: 1

Views

Author

Paolo P. Lava, May 26 2015

Keywords

Examples

			25 = concat(2,5); phi(25) + phi(2) + phi(5) = 20 + 1 + 4 = 25;
177 = concat(1,77); phi(177) + phi(1) + phi(77) = 116 + 1 + 60 = 177; etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a, b, i; global n; for n from 1 to q do
    for i from 1 to ilog10(n) do a:=trunc(n/10^i); b:=n-a*10^i;
    if a>0 and b>0 then if phi(n)+phi(a)+phi(b)=n
    then print(n); break; fi; fi; od; od; end: P(10^9);

Extensions

a(18) inserted by Giovanni Resta, May 27 2015
Showing 1-2 of 2 results.