|
|
A161341
|
|
First differences of A161340.
|
|
2
|
|
|
1, 26, 56, 260, 56, 392, 392, 2192, 56, 392, 392, 2744, 392, 2744, 2744, 16952, 56, 392, 392, 2744, 392, 2744, 2744, 19208, 392, 2744, 2744, 19208, 2744, 19208, 19208, 125336, 56, 392, 392, 2744, 392, 2744, 2744, 19208, 392, 2744, 2744, 19208, 2744, 19208, 19208
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = A160429(n) for n>1 and n not a power of 2.
a(n) = A160429(n) - 3n*(3n - 1) for n>1 and n a power of 2.
|
|
EXAMPLE
|
Written as an irregular triangle in which row lengths give A011782 the sequence begins:
1;
26;
56, 260;
56, 392, 392, 2192;
56, 392, 392, 2744, 392, 2744, 2744, 16952;
56, 392, 392, 2744, 392, 2744, 2744, 19208, 392, 2744, 2744, 19208, 2744, ...
(End)
|
|
PROG
|
(PARI) f(n) = 8*7^hammingweight(n-1); \\ A160429
ispow2(n) = my(k); (n==2) || (ispower(n, , &k) && (k==2));
a(n) = if (n==1, 1, if (ispow2(n), f(n) - 3*n*(3*n - 1), f(n))); \\ Michel Marcus, Mar 15 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|