cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A020948 Least k such that b(k) = n, where b( ) is sequence A020944.

This page as a plain text file.
%I A020948 #16 Feb 18 2022 13:05:48
%S A020948 1,8,16,32,34,128,66,68,130,134,132,140,138,260,264,284,268,266,274,
%T A020948 572,276,524,522,536,534,530,538,1034,532,548,556,1046,1042,554,1050,
%U A020948 1082,1044,2072,1092,1064,1060,2114,1068,1076,1132,1100,1066,2102,1098,1106,2088,2084,2098,4346,1108
%N A020948 Least k such that b(k) = n, where b( ) is sequence A020944.
%H A020948 Seiichi Manyama, <a href="/A020948/b020948.txt">Table of n, a(n) for n = 1..10000</a>
%t A020948 a[n_] := a[n] = Which[n < 2, Boole[n == 1] - Boole[n == 0], OddQ[n], Abs[a[n - 1] - a[n - 2]], True, a[n/2] + a[n/2 - 1]]; s = Array[a[#] &, 4200]; Array[FirstPosition[s, #][[1]] &, LengthWhile[Differences@ Union@ s, # == 1 &]] (* _Michael De Vlieger_, Feb 18 2022, after _Michael Somos_ at A020944 *)
%Y A020948 Cf. A020943-A020945, A002487, A020947, A020948, A020949, A020950.
%K A020948 nonn
%O A020948 1,2
%A A020948 _Clark Kimberling_
%E A020948 More terms from _Seiichi Manyama_, Feb 18 2022