login
Numbers that can be expressed as p+p^n (p prime, n >= 0) in more than one way.
2

%I #9 May 19 2024 08:53:02

%S 4,6,10,12,14,18,30,34,38,62,74,84,130,132,158,182,194,258,278,314,

%T 350,380,398,422,458,514,542,614,662,674,734,758,878,992,998,1094,

%U 1154,1202,1214,1238,1322,1382,1454,1622,1658,1722,1754,1874,1934,1994,2018,2138

%N Numbers that can be expressed as p+p^n (p prime, n >= 0) in more than one way.

%H Jason Yuen, <a href="/A102070/b102070.txt">Table of n, a(n) for n = 1..10000</a>

%e 14 = 7+7^1 = 13+13^0. 130 = 2+2^7 = 5+5^3.

%o (PARI) v = vector(20000); count = 0; i = 1; p = 2; while (p < 5000, pow = 1; while (pow < 5000, n = p + pow; count++; v[count] = n; pow *= p); i++; p = prime(i)); w = vector(count, x, v[x]); v = vecsort(w); i = 3; for (j = 2, count, if (v[j] == v[j - 1] && v[j] != v[j - 2], print1(v[j], ", ")));

%K easy,nonn

%O 1,1

%A _David Wasserman_, Dec 28 2004