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!)
A271324 a(n) = n + floor(n/4) + (n mod 4). 1
0, 2, 4, 6, 5, 7, 9, 11, 10, 12, 14, 16, 15, 17, 19, 21, 20, 22, 24, 26, 25, 27, 29, 31, 30, 32, 34, 36, 35, 37, 39, 41, 40, 42, 44, 46, 45, 47, 49, 51, 50, 52, 54, 56, 55, 57, 59, 61, 60, 62, 64, 66, 65, 67, 69, 71, 70, 72, 74, 76, 75, 77, 79, 81, 80, 82, 84, 86, 85, 87, 89 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Sort the terms in increasing order and add 1 to get sequence A032769.
LINKS
FORMULA
O.g.f.: x*(2 + 2*x + 2*x^2 - x^3)/((1 - x)^2*(1 + x + x^2 + x^3)).
E.g.f.: ((6 + 5*x)*sinh(x) + (3 + 5*x)*cosh(x) - 3*(sin(x) + cos(x)))/4.
a(n) = 1 + (10*n - 6*(-1)^((n-1)*n/2) - 3*(-1)^n + 1)/8.
a(4*k + r) = 5*k + 2*r, with r = 0, 1, 2 or 3.
a(n + 4*k) = a(n) + 5*k.
MATHEMATICA
Table[n + Floor[n/4] + Mod[n, 4], {n, 0, 80}]
PROG
(PARI) vector(80, n, n--; n + floor(n/4) + n%4)
(Sage) [n + floor(n/4) + n%4 for n in (0..80)]
(Maxima) makelist(n + floor(n/4) + mod(n, 4), n, 0, 80);
(Magma) [n + Floor(n/4) + (n mod 4): n in [0..80]];
(Python)
def A271324(n): return n+(n>>2)+(n&3) # Chai Wah Wu, Jan 29 2023
CROSSREFS
Cf. A032769.
Cf. numbers of the form m + floor(m/k) + (m mod k): A028242 (k=-2), A000004 (k=-1), A005843 (k=1), A007494 (k=2), A063224 (k=3).
Sequence in context: A023825 A022485 A230631 * A177961 A353733 A297615
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Apr 04 2016
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 April 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)