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!)
A272299 a(n) = n + 2*floor(n/2) + 3*floor(n/3). 1
0, 1, 4, 8, 11, 12, 18, 19, 22, 26, 29, 30, 36, 37, 40, 44, 47, 48, 54, 55, 58, 62, 65, 66, 72, 73, 76, 80, 83, 84, 90, 91, 94, 98, 101, 102, 108, 109, 112, 116, 119, 120, 126, 127, 130, 134, 137, 138, 144, 145, 148, 152, 155, 156, 162, 163, 166, 170, 173, 174, 180, 181, 184, 188, 191, 192, 198, 199 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Also, numbers congruent to {0, 1, 4, 8, 11, 12} mod 18.

First differences: 1, 3, 4 or 6.

a(h) + a(h+1) is in the sequence if h is not of the form 3*k+1 (A007494). In this case: a(h) + a(h+1) = a(2*h+1).

LINKS

Bruno Berselli, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,-1).

FORMULA

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

a(n) = a(n-2) + a(n-3) - a(n-5).

a(n) = 3*n - (n mod 2) - (n mod 3). More generally, it is easy to see that Sum_{i=1}^k i*floor(n/i) = k*n - Sum_{i=1}^k (n mod i).

a(3*m + r) = 9*m + r^2 - (1-(-1)^m)*(-1)^r/2, with r = 0, 1 or 2. Therefore: for even m, a(3*m + r) = 9*m + r^2; otherwise, a(3*m + r) = 9*m + r^2 - (-1)^r.

MATHEMATICA

Table[n + 2*Floor[n/2] + 3*Floor[n/3], {n, 0, 70}]

PROG

(PARI) vector(70, n, n--; n+2*floor(n/2)+3*floor(n/3))

(Sage) [n+2*floor(n/2)+3*floor(n/3) for n in (0..70)]

(Maxima) makelist(n+2*floor(n/2)+3*floor(n/3), n, 0, 70);

(Magma) [n+2*Floor(n/2)+3*Floor(n/3): n in [0..70]];

CROSSREFS

Cf. A042948: n + 2*floor(n/2).

Sequence in context: A311019 A068798 A264890 * A282144 A147515 A311020

Adjacent sequences:  A272296 A272297 A272298 * A272300 A272301 A272302

KEYWORD

nonn,easy

AUTHOR

Bruno Berselli, Apr 30 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 October 1 11:38 EDT 2022. Contains 357147 sequences. (Running on oeis4.)