OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(32)=4: 32 = 2^4+2^4 = 4^2+4^2 = 16^1+16^1 = 31^0+31^1;
a(33)=2: 33 = 2^0+2^5 = 32^0+32^1;
a(34)=3: 34 = 2^1+2^5 = 17^1+17^1 = 33^0+33^1.
MAPLE
N:= 200:
V:= Vector(N, i -> 2-(i mod 2)):
for x from 2 while 1 + x^2 <= N do
for i from 0 while 2*x^i <= N do
for j from max(2, i) do
t:= x^i + x^j;
if t > N then break fi;
V[t]:= V[t]+1
od od od:
V[1]:= 0: V[2]:= 1:
convert(V, list); # Robert Israel, Mar 27 2020
MATHEMATICA
M = 200;
V = 2 - Mod[Range[M], 2];
For[x = 2, 1 + x^2 <= M, x++, For[i = 0, 2 x^i <= M, i++, For[j = Max[2, i], True, j++, t = x^i + x^j; If[t > M, Break[]]; V[[t]]++]]];
V[[1]] = 0; V[[2]] = 1;
V (* Jean-François Alcover, Jun 15 2020, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Entry completely revised: Hugo Pfoertner and Reinhard Zumkeller, Oct 20 2004
STATUS
approved