|
|
A126255
|
|
Number of distinct terms i^j for 2 <= i,j <= n.
|
|
2
|
|
|
1, 4, 8, 15, 23, 34, 44, 54, 69, 88, 106, 129, 152, 177, 195, 226, 256, 291, 324, 361, 399, 442, 483, 519, 564, 600, 648, 703, 755, 814, 856, 915, 976, 1039, 1085, 1156, 1224, 1295, 1365, 1444, 1519, 1602, 1681, 1762, 1846, 1937, 2023, 2095, 2184, 2279
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
COMMENTS
|
An easy upper bound is (n-1)^2 = A000290(n-1).
|
|
LINKS
|
Eric M. Schmidt, Table of n, a(n) for n = 2..10000
N. Hobson, Home page (listed in lieu of email address)
Project Euler, Problem 29: Distinct powers.
|
|
EXAMPLE
|
a(4) = 8 as there are 8 distinct terms in 2^2=4, 2^3=8, 2^4=16, 3^2=9, 3^3=27, 3^4=81, 4^2=16, 4^3=64, 4^4=256.
|
|
PROG
|
(PARI) lim=51; z=listcreate((lim-1)^2); for(m=2, lim, for(i=2, m, x=factor(i);
x[, 2]*=m; s=Str(x); f=setsearch(z, s, 1); if(f, listinsert(z, s, f)));
t=factor(m); for(j=2, m, x=t; x[, 2]=j*t[, 2]; s=Str(x); f=setsearch(z, s,
1); if(f, listinsert(z, s, f))); print1(#z, ", "))
|
|
CROSSREFS
|
Cf. A027424, A061786, A126254-A126257.
Sequence in context: A001182 A264599 A122247 * A267682 A194804 A169953
Adjacent sequences: A126252 A126253 A126254 * A126256 A126257 A126258
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Nick Hobson, Dec 24 2006
|
|
STATUS
|
approved
|
|
|
|