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.

A360476 The integers of the sequence appear exactly twice. Between the two copies of k there are k odd integers. The sequence is always extended with the smallest integer not leading to a contradiction.

This page as a plain text file.
%I A360476 #27 Mar 01 2023 14:42:52
%S A360476 1,2,3,1,2,4,5,6,7,3,8,9,4,10,11,12,13,5,6,14,15,16,17,7,18,19,8,20,
%T A360476 21,22,23,9,10,24,25,26,27,11,12,28,29,30,31,13,32,33,14,34,35,36,37,
%U A360476 15,16,38,39,40,41,17,42,43,18,44,45,46,47,19,20,48,49,50
%N A360476 The integers of the sequence appear exactly twice. Between the two copies of k there are k odd integers. The sequence is always extended with the smallest integer not leading to a contradiction.
%e A360476 There is one odd integer between the two 1s: this is the integer 3;
%e A360476 there are two odd integers between the two 2s: they are 3 and 1;
%e A360476 there are three odd integers between the two 3s: they are 1, 5 and 7; etc.
%t A360476 lst={1};k=2;
%t A360476 Do[While[FreeQ[lst,k]&&Count[lst[[First@@Position[lst,t]+1;;]],a_/;OddQ@a]!=t,AppendTo[lst,k];k++];lst=AppendTo[lst,t],{t,25}];lst (* _Giorgos Kalogeropoulos_, Feb 28 2023 *)
%Y A360476 Cf. A132291.
%K A360476 nonn
%O A360476 1,2
%A A360476 _Eric Angelini_, Feb 12 2023
%E A360476 More terms from _Jinyuan Wang_, Feb 14 2023