login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088904 Number of ways to write n = x^i + x^j with 1<x<=n and 0<=i<=j. 3

%I #11 Jun 16 2020 08:33:51

%S 0,1,1,2,2,3,1,3,2,4,1,4,1,2,1,3,3,4,1,4,1,2,1,3,1,3,1,3,1,4,1,4,2,3,

%T 1,4,2,2,1,3,1,3,1,2,1,2,1,3,1,4,1,2,1,3,1,3,1,2,1,2,1,2,1,3,4,3,1,4,

%U 1,2,1,5,1,2,1,2,1,2,1,4,1,4,1,3,1,2,1,2,1,4,1,2,1,2,1,3,1,3,1,2

%N Number of ways to write n = x^i + x^j with 1<x<=n and 0<=i<=j.

%C a(A088905(n)) = 1;

%C a(A088906(n)) = n and a(k) < n for 1 <= k < A088906(n).

%H Robert Israel, <a href="/A088904/b088904.txt">Table of n, a(n) for n = 1..10000</a>

%e a(32)=4: 32 = 2^4+2^4 = 4^2+4^2 = 16^1+16^1 = 31^0+31^1;

%e a(33)=2: 33 = 2^0+2^5 = 32^0+32^1;

%e a(34)=3: 34 = 2^1+2^5 = 17^1+17^1 = 33^0+33^1.

%p N:= 200:

%p V:= Vector(N,i -> 2-(i mod 2)):

%p for x from 2 while 1 + x^2 <= N do

%p for i from 0 while 2*x^i <= N do

%p for j from max(2,i) do

%p t:= x^i + x^j;

%p if t > N then break fi;

%p V[t]:= V[t]+1

%p od od od:

%p V[1]:= 0: V[2]:= 1:

%p convert(V,list); # _Robert Israel_, Mar 27 2020

%t M = 200;

%t V = 2 - Mod[Range[M], 2];

%t 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]]++]]];

%t V[[1]] = 0; V[[2]] = 1;

%t V (* _Jean-François Alcover_, Jun 15 2020, after _Robert Israel_ *)

%K nonn

%O 1,4

%A Entry completely revised: _Hugo Pfoertner_ and _Reinhard Zumkeller_, Oct 20 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)