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!)
A242877 Number of points of norm <= n in square lattice which can be built as entire powers of points of the square lattice seen as image of the complex plane C* (excluding (0,0)). 1

%I #32 May 28 2014 23:47:21

%S 4,6,10,12,16,20,20,24,26,30,30,42,42,46,46,48,52,52,54,58,58,58,62,

%T 62,68,70,76,76,78,80,80,92,92,96,96,98,98,102,102,106,110,110,110,110

%N Number of points of norm <= n in square lattice which can be built as entire powers of points of the square lattice seen as image of the complex plane C* (excluding (0,0)).

%H Martin Y. Champel, <a href="/A242877/b242877.txt">Table of n, a(n) for n = 1..10000</a>

%e for n=1, a(1)=4 as (1,0),(0,1),(-1,0),(0,-1) are powers of (1,0), (0,-1),(0,1) and (0,1) respectively powered by 2,3,2 and 3.

%e for n=2, a(2)=6 as in addition of the 4 previous points can be found 2 points (0,2) and (0,-2) built as (1,1)^2 and (1,-1)^2.

%e for n=3, a(3)=10 as in addition of the 6 previous points can be found 4 points (2,2), (2,-2), (-2,-2) and (-2,2) built as (-1,1)^3, (-1,-1)^3, (1,-1)^3 and (1,1)^3 respectively.

%o (Python)

%o from math import *

%o i0=complex(1,0)

%o i1=complex(0,1)

%o f0={0,i0,i1,-i0,-i1}

%o def A242877(n):

%o ....if n==0: return 0

%o ....if n==1: return 4

%o ....f0={0,i0,i1,-i0,-i1}

%o ....k=2

%o ....while True:

%o ........ro=n**(1/k)

%o ........if ro<sqrt(1.9999):break

%o ........ro_int = int(ro)

%o ........for a in range(-ro_int,ro_int+1):

%o ............b_max = int(sqrt(ro*ro-a*a))

%o ............for b in range(-b_max,b_max+1):

%o ................c=complex(a,b)

%o ................f0.add(c**k)

%o ........k+=1

%o ....return len(f0)-1

%Y Cf. A000328, A001597, A069623.

%K nonn

%O 1,1

%A _Martin Y. Champel_, May 25 2014

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)