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.

A337159 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, A033307(n + a(n)) = A033307(n).

This page as a plain text file.
%I A337159 #31 Jan 31 2021 22:28:00
%S A337159 0,13,14,15,16,17,18,19,20,2,40,1,3,4,21,6,33,8,51,53,60,11,80,9,100,
%T A337159 7,120,5,140,10,160,12,157,41,163,39,23,37,31,35,49,73,67,71,85,29,
%U A337159 103,27,121,47,141,25,137,43,143,61,144,59,145,57,45,55,63,93
%N A337159 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, A033307(n + a(n)) = A033307(n).
%C A337159 This sequence is a permutation of the nonnegative integers: repunits induce runs of consecutive equal terms of arbitrary size in A033307, thus allowing any value to eventually occur.
%H A337159 Rémy Sigrist, <a href="/A337159/b337159.txt">Table of n, a(n) for n = 0..10000</a>
%H A337159 Rémy Sigrist, <a href="/A337159/a337159.png">Scatterplot of the first 10000 terms</a>
%H A337159 Rémy Sigrist, <a href="/A337159/a337159.gp.txt">PARI program for A337159</a>
%H A337159 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A337159 (PARI) See Links section.
%o A337159 (Python)
%o A337159 def aupton(terms):
%o A337159   alst, A033307, last, used, n, an = [], '1', 1, set(), 0, 0
%o A337159   while n <= terms:
%o A337159     while an in used: an += 1
%o A337159     while len(A033307) <= n + an: last += 1; A033307 += str(last)
%o A337159     if A033307[n + an] == A033307[n]:
%o A337159       alst += [an]; used.add(an); n += 1; an = 0
%o A337159     else: an += 1
%o A337159   return alst
%o A337159 print(aupton(63)) # _Michael S. Branicky_, Jan 30 2021
%Y A337159 Cf. A033307, A340490.
%K A337159 nonn,look,base
%O A337159 0,2
%A A337159 _Rémy Sigrist_, Jan 30 2021