A359369 a(1) = 1. Thereafter a(n) = Sum_{j=1..n} {b(a(j)), where b(a(j)) = b(a(n))}, and b is A000120.
1, 1, 2, 3, 2, 4, 5, 4, 6, 6, 8, 7, 3, 10, 12, 14, 6, 16, 8, 9, 18, 20, 22, 9, 24, 26, 12, 28, 15, 4, 10, 30, 8, 11, 18, 32, 12, 34, 36, 38, 21, 24, 40, 42, 27, 12, 44, 30, 16, 13, 33, 46, 20, 48, 50, 36, 52, 39, 24, 54, 28, 42, 45, 32, 14, 48, 56, 51, 36, 58, 40, 60, 44, 54, 48, 62, 5
Offset: 1
Examples
1 appears twice only, first as given starting term a(1), then as a(2) = 1. a(7) = 5, consequent to a(6)=4, the 5th term so far with binary weight = 1. a(77) = 5, consequent to a(76) = 62, the first occurrence of a term with binary weight = 5. These are the only occurrences of 5 in the sequence. The first occurrence of 8 is a(11), following a(10) = 6, the fourth term with weight 2. a(11) = 8 is the 7th term with weight 1, and a(12) is the first occurrence of 7.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
- Michael De Vlieger, Log log scatterplot of a(n) n = 1..2^16, with a color function showing m = A000120(a(n-1)) with m = 1 in red, m = 2 in orange, ..., m = 15 in magenta.
Programs
-
Mathematica
Block[{a, c, f, k, nn}, nn = 76; c[] = 0; a[1] = 1; f[n] := DigitCount[n, 2, 1]; Do[Set[k, ( c[#]++; # c[#]) &[f[#]]] &@a[n - 1]; Set[a[n], k], {n, 2, nn}]; Array[a, nn] ] (* Michael De Vlieger, Dec 28 2022 *)
Comments