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!)
A316657 For any n >= 0 with base-5 expansion Sum_{k=0..w} d_k * 5^k, let f(n) = Sum_{k=0..w} [d_k > 0] * (2 + i)^k * i^(d_k - 1) (where [] is an Iverson bracket and i denotes the imaginary unit); a(n) equals the real part of f(n). 11

%I #19 Nov 06 2021 18:09:27

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

%T 3,5,6,5,4,5,2,3,2,1,2,1,2,1,0,1,4,5,4,3,4,-4,-3,-4,-5,-4,-2,-1,-2,-3,

%U -2,-5,-4,-5,-6,-5,-6,-5,-6,-7,-6,-3,-2,-3,-4,-3

%N For any n >= 0 with base-5 expansion Sum_{k=0..w} d_k * 5^k, let f(n) = Sum_{k=0..w} [d_k > 0] * (2 + i)^k * i^(d_k - 1) (where [] is an Iverson bracket and i denotes the imaginary unit); a(n) equals the real part of f(n).

%C See A316658 for the imaginary part of f.

%C See A316707 for the square of the modulus of f.

%C The function f has nice fractal features (see scatterplot in Links section).

%C It appears that f defines a bijection from the nonnegative integers to the Gaussian integers.

%H Rémy Sigrist, <a href="/A316657/b316657.txt">Table of n, a(n) for n = 0..15624</a>

%H Rémy Sigrist, <a href="/A316657/a316657.png">Colored scatterplot of (a(n), A316658(n)) for n=0..5^8-1</a> (where the hue is function of n)

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Gaussian_integer">Gaussian integer</a>

%F a(5^n) = A139011(n) for any n >= 0.

%F a(3 * 5^n) = -A139011(n) for any n >= 0.

%t a[n_] := Module[{d, z}, d = IntegerDigits[n, 5] // Reverse; z = Sum[ If[d[[i]]>0, (2+I)^(i-1)*I^(d[[i]]-1), 0], {i, 1, Length[d]}]; Re[z]];

%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Nov 06 2021, after PARI code *)

%o (PARI) a(n) = my (d=Vecrev(digits(n, 5)), z=sum(i=1, #d, if (d[i], (2+I)^(i-1) * I^(d[i]-1), 0))); real(z)

%Y Cf. A139011, A316658, A316707.

%K sign,base

%O 0,6

%A _Rémy Sigrist_, Jul 09 2018

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 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)