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!)
A258438 Sum_{i=1..n} Sum_{j=1..n} (i OR j), where OR is the binary logical OR operator. 1
0, 1, 9, 24, 64, 117, 189, 280, 456, 657, 889, 1152, 1464, 1813, 2205, 2640, 3376, 4161, 5001, 5896, 6864, 7893, 8989, 10152, 11448, 12817, 14265, 15792, 17416, 19125, 20925, 22816, 25824, 28929, 32137, 35448, 38880, 42421, 46077, 49848, 53800 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Giovanni Resta, Table of n, a(n) for n = 0..10000

FORMULA

a(2^k) = (3*8^k+5*4^k)/4-2^k. - Giovanni Resta, May 30 2015

a(2^k-1) = 2^(k-2) * (4 - 7*2^k + 3*4^k). - Enrique Pérez Herrero, Jun 10 2015

a(n) = n^3 + n^2 - A224924(n). - Robert Israel, Jun 11 2015

MAPLE

A[0]:= 0:

for n from 1 to 100 do

  A[n]:= A[n-1] + n + 2*add(Bits[Or](i, n), i=1..n-1)

od:

seq(A[i], i=0..100); # Robert Israel, Jun 11 2015

MATHEMATICA

a[n_] := Sum[BitOr[i, j], {i, 1, n}, {j, 1, n}]; Table[a[n], {n, 0, 40}]

PROG

(PARI) a(n) = sum(i=1, n, sum(j=1, n, bitor(i, j))); \\ Michel Marcus, May 31 2015

CROSSREFS

Cf. A224924.

Sequence in context: A079770 A079771 A297225 * A038626 A195970 A223372

Adjacent sequences:  A258435 A258436 A258437 * A258439 A258440 A258441

KEYWORD

nonn,base

AUTHOR

Enrique Pérez Herrero, May 30 2015

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 September 29 10:30 EDT 2022. Contains 357088 sequences. (Running on oeis4.)