A161341 First differences of A161340.
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
Offset: 1
Examples
From _Omar E. Pol_, Mar 15 2020: (Start) 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)
Programs
-
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
Formula
Extensions
Formula and more terms from Nathaniel Johnston, Nov 15 2010
More terms from Jinyuan Wang, Mar 14 2020