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.
%I A372352 #7 May 11 2025 11:44:58 %S A372352 0,1,0,1,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,8,9,10,11,12, %T A372352 13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,0,1,2,3,4,5, %U A372352 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,0,1,2,3,4,5,6 %N A372352 The difference between n and the largest term of A086893 <= n. %C A372352 The terms a(n) grow from 0 (whenever n is in A086893) by 1 until the next element of A086893 is reached. - _M. F. Hasler_, May 08 2025 %F A372352 a(n) = n - max ( A086893 intersect [1..n] ) (= 0 iff n in A086893). - _M. F. Hasler_, May 08 2025 %o A372352 (PARI) %o A372352 A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893 %o A372352 A372352(n) = { my(k); for(i=1,oo,k=A086893(i); if(k>n, return(n-A086893(i-1)))); }; %Y A372352 Cf. A086893, A096773, A372353. %Y A372352 Cf. also A372286. %K A372352 nonn,easy %O A372352 1,7 %A A372352 _Antti Karttunen_ (proposed by _Ali Sada_), Apr 29 2024