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 A071797 #70 Sep 12 2022 09:52:30 %S A071797 1,1,2,3,1,2,3,4,5,1,2,3,4,5,6,7,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9, %T A071797 10,11,1,2,3,4,5,6,7,8,9,10,11,12,13,1,2,3,4,5,6,7,8,9,10,11,12,13,14, %U A071797 15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,1,2,3,4,5,6,7,8,9,10,11 %N A071797 Restart counting after each new odd integer (a fractal sequence). %C A071797 The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. %C A071797 This is also a triangle read by rows in which row n lists the first 2*n-1 positive integers, n >= 1 (see example). - _Omar E. Pol_, May 29 2012 %C A071797 a(n) mod 2 = A071028(n). - _Boris Putievskiy_, Jul 24 2013 %C A071797 The triangle in the example is the triangle used by Kircheri in 1664. See the link "Mundus Subterraneus". - _Charles Kusniec_, Sep 11 2022 %H A071797 Reinhard Zumkeller, <a href="/A071797/b071797.txt">Table of n, a(n) for n = 1..1000</a> %H A071797 Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, Daisy Ann A. Disu, <a href="http://www.dmmmsu-sluc.com/wp-content/uploads/2018/03/CAS-Monitor-2016-2017-1.pdf">On Fractal Sequences</a>, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113. %H A071797 C. Kimberling, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa73/aa7321.pdf">Numeration systems and fractal sequences</a>, Acta Arithmetica 73 (1995) 103-117. %H A071797 Athanasii Kircheri, <a href="https://archive.org/details/athanasiikircher00kirc_4/page/n53/mode/2up">Mundus Subterraneus</a>, (1664), pg. 24. %H A071797 F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>, Phoenix,AZ: Xiquan,1993. %H A071797 Michael Somos, <a href="/A073189/a073189.txt">Sequences used for indexing triangular or square arrays</a> %F A071797 a(n) = 1 + A053186(n-1). %F A071797 a(n) = n - 1 - ceiling(sqrt(n))*(ceiling(sqrt(n))-2); n > 0. %F A071797 a(n) = n - floor(sqrt(n-1))^2, distance between n and the next smaller square. - _Marc LeBrun_, Jan 14 2004 %e A071797 a(1)=1; a(9)=5; a(10)=1; %e A071797 From _Omar E. Pol_, May 29 2012: (Start) %e A071797 Written as a triangle the sequence begins: %e A071797 1; %e A071797 1, 2, 3; %e A071797 1, 2, 3, 4, 5; %e A071797 1, 2, 3, 4, 5, 6, 7; %e A071797 1, 2, 3, 4, 5, 6, 7, 8, 9; %e A071797 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11; %e A071797 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; %e A071797 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15; %e A071797 Row n has length 2*n - 1 = A005408(n-1). (End) %p A071797 A071797 := proc(n) %p A071797 n-A048760(n-1) ; %p A071797 end proc: # _R. J. Mathar_, May 29 2016 %t A071797 Array[Range[2# - 1]&, 10] // Flatten (* _Jean-François Alcover_, Jan 30 2018 *) %o A071797 (PARI) a(n)=if(n<1,0,n-sqrtint(n-1)^2) %o A071797 (Haskell) %o A071797 import Data.List (inits) %o A071797 a071797 n = a071797_list !! (n-1) %o A071797 a071797_list = f $ tail $ inits [1..] where %o A071797 f (xs:_:xss) = xs ++ f xss %o A071797 -- _Reinhard Zumkeller_, Apr 14 2014 %Y A071797 Cf. A002260, A004737, A006590, A027052, A071028, A078358, A078446. %Y A071797 Cf. A074294. %Y A071797 Row sums give positive terms of A000384. %K A071797 easy,nonn,tabf %O A071797 1,3 %A A071797 _Antonio Esposito_, Jun 06 2002