login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105348 An indicator sequence for the Jacobsthal numbers. 9

%I

%S 1,2,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,

%T 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0

%N An indicator sequence for the Jacobsthal numbers.

%C a(n) is the number of solutions to the Diophantine equation 2*x^2 - (9*n+1)*x + 9*n^2 = 1 where valid solutions are restricted to powers of 4. - _Hieronymus Fischer_, May 17 2007

%H Antti Karttunen, <a href="/A105348/b105348.txt">Table of n, a(n) for n = 0..87381</a>

%F G.f.: Sum_{k>=0} x^A001045(k).

%F a(n) = 1 + floor(log_2(3n+1)) - ceiling(log_2(3n-1)) = floor(log_2(3n+1)) - floor(log_2(3n-2)) for n >= 1. Also true: a(n) = 1 + A130249(n) - A130250(n) = A130253(n) - A130250(n) = A130250(n+1) - A130250(n) for n >= 0. - _Hieronymus Fischer_, May 17 2007

%e a(1)=2 since J(1)=J(2)=1.

%o (PARI)

%o A147612aux(n,i) = if(!(n%2),n,A147612aux((n+i)/2,-i));

%o A147612(n) = 0^(A147612aux(n,1)*A147612aux(n,-1));

%o A105348(n) = if(1==n,2,A147612(n)); \\ _Antti Karttunen_, Nov 02 2018

%Y For partial sums see A130253. Cf. A130249, A130250, A147612.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Apr 01 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 22 05:17 EST 2019. Contains 320385 sequences. (Running on oeis4.)