Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A047596 Numbers that are congruent to {2, 3, 4, 5} mod 8. 2
2, 3, 4, 5, 10, 11, 12, 13, 18, 19, 20, 21, 26, 27, 28, 29, 34, 35, 36, 37, 42, 43, 44, 45, 50, 51, 52, 53, 58, 59, 60, 61, 66, 67, 68, 69, 74, 75, 76, 77, 82, 83, 84, 85, 90, 91, 92, 93, 98, 99, 100, 101, 106, 107, 108, 109, 114, 115, 116, 117, 122, 123 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For n > 2, a(n) is the decimal value that results from the conversion of n-1 to binary whose last two bits are altered by either of the following rules: 00->010, 01->011, 10->100, 11->101. For example a(10) = 19 because 10 - 1 = 9 = '10'01'->'10'011' = 19. - Franck Maminirina Ramaharo, Jul 25 2018
LINKS
FORMULA
G.f.: x*(2+x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)). [Bruno Berselli, Jul 17 2012]
a(n) = 2*n-1-i^(n*(n+1))-(1+(-1)^n)/2, where i=sqrt(-1). [Bruno Berselli, Jul 17 2012]
a(n) = 2n - A010873(n-1). - Wesley Ivan Hurt, Jul 07 2013
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = A047621(k), a(2k-1) = A047463(k). (End)
E.g.f.: 3 + sin(x) - cos(x) + (2*x - 1)*sinh(x) + 2*(x - 1)*cosh(x). - Ilya Gutkovskiy, Jun 02 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/16 - (sqrt(2)+3)*log(2)/8 + sqrt(2)*log(sqrt(2)+2)/4. - Amiram Eldar, Dec 25 2021
MAPLE
A047596:=n->2*n-1-I^(n*(n+1))-(1+I^(2*n))/2: seq(A047596(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
MATHEMATICA
Select[Range[120], MemberQ[{2, 3, 4, 5}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 4, 5, 10}, 60] (* Bruno Berselli, Jul 17 2012 *)
PROG
(Magma) [n: n in [1..120] | n mod 8 in [2..5]]; // Bruno Berselli, Jul 17 2012
(Maxima) makelist(2*n-1-%i^(n*(n+1))-(1+(-1)^n)/2, n, 1, 60); /* Bruno Berselli, Jul 17 2012 */
(PARI) Vec((2+x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) \\ Bruno Berselli, Jul 17 2012
(GAP) Filtered([1..130], n->n mod 8=2 or n mod 8=3 or n mod 8=4 or n mod 8=5); # Muniru A Asiru, Jul 27 2018
CROSSREFS
Sequence in context: A007092 A241213 A362931 * A199502 A089964 A210495
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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 August 19 02:04 EDT 2024. Contains 375284 sequences. (Running on oeis4.)