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!)
A214392 If n mod 4 = 0 then a(n) = n/4, otherwise a(n) = n. 4

%I #40 Nov 28 2022 08:28:07

%S 0,1,2,3,1,5,6,7,2,9,10,11,3,13,14,15,4,17,18,19,5,21,22,23,6,25,26,

%T 27,7,29,30,31,8,33,34,35,9,37,38,39,10,41,42,43,11,45,46,47,12,49,50,

%U 51,13,53,54,55,14,57,58

%N If n mod 4 = 0 then a(n) = n/4, otherwise a(n) = n.

%C Equivalent to A065883 for n mod 16 != 0. - _Peter Kagey_, Sep 02 2015

%H Jeremy Gardiner, <a href="/A214392/b214392.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,2,0,0,0,-1).

%F From _Bruno Berselli_, Oct 16 2012: (Start)

%F G.f.: x*(1+2*x+3*x^2+x^3+3*x^4+2*x^5+x^6)/(1-x^4)^2.

%F a(n) = ( 1 - (3/16)*(1+(-1)^n)*(1+i^(n(n+1))) )*n, where i=sqrt(-1).

%F a(n) = a(-n) = 2*a(n-4) - a(n-8). (End)

%F From _Werner Schulte_, Jul 08 2018: (Start)

%F a(n) for n > 0 is multiplicative with a(2^e) = 2^e if e < 2 and a(2^e) = 2^(e-2) if e > 1 otherwise a(p^e) = p^e for prime p > 2 and e >= 0.

%F Dirichlet g.f.: Sum_{n>0} a(n)/n^s = (1-3/4^s)*zeta(s-1).

%F Dirichlet inverse b(n) is multiplicative with b(2^e) = (-1)^e * A038754(e), e >= 0, and for prime p > 2: b(p) = -p and b(p^e) = 0 if e > 1. (End)

%F Sum_{k=1..n} a(k) ~ (13/32) * n^2. - _Amiram Eldar_, Nov 28 2022

%e a(16) = 16/4 = 4;

%e a(17) = 17.

%t Table[If[Mod[n, 4] == 0, n/4, n], {n, 0, 50}] (* _G. C. Greubel_, Oct 26 2017 *)

%t LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,1,2,3,1,5,6,7},60] (* _Harvey P. Dale_, Mar 30 2018 *)

%o (PARI) a(n)=if(n%4,n,n/4) \\ _Charles R Greathouse IV_, Oct 16 2015

%Y Cf. A026741, A051176, A186646, A065883, A038754.

%K nonn,easy,mult

%O 0,3

%A _Jeremy Gardiner_, Jul 15 2012

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 16 05:35 EDT 2024. Contains 371697 sequences. (Running on oeis4.)