login
A071797
Restart counting after each new odd integer (a fractal sequence).
20
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, 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, 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
OFFSET
1,3
COMMENTS
The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446.
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
a(n) mod 2 = A071028(n). - Boris Putievskiy, Jul 24 2013
The triangle in the example is the triangle used by Kircheri in 1664. See the link "Mundus Subterraneus". - Charles Kusniec, Sep 11 2022
LINKS
Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113.
C. Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
Athanasii Kircheri, Mundus Subterraneus, (1664), pg. 24.
F. Smarandache, Only Problems, Not Solutions!, Phoenix,AZ: Xiquan,1993.
FORMULA
a(n) = 1 + A053186(n-1).
a(n) = n - 1 - ceiling(sqrt(n))*(ceiling(sqrt(n))-2); n > 0.
a(n) = n - floor(sqrt(n-1))^2, distance between n and the next smaller square. - Marc LeBrun, Jan 14 2004
EXAMPLE
a(1)=1; a(9)=5; a(10)=1;
From Omar E. Pol, May 29 2012: (Start)
Written as a triangle the sequence begins:
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, 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, 15;
Row n has length 2*n - 1 = A005408(n-1). (End)
MAPLE
A071797 := proc(n)
n-A048760(n-1) ;
end proc: # R. J. Mathar, May 29 2016
MATHEMATICA
Array[Range[2# - 1]&, 10] // Flatten (* Jean-François Alcover, Jan 30 2018 *)
PROG
(PARI) a(n)=if(n<1, 0, n-sqrtint(n-1)^2)
(Haskell)
import Data.List (inits)
a071797 n = a071797_list !! (n-1)
a071797_list = f $ tail $ inits [1..] where
f (xs:_:xss) = xs ++ f xss
-- Reinhard Zumkeller, Apr 14 2014
CROSSREFS
Cf. A074294.
Row sums give positive terms of A000384.
Sequence in context: A274641 A003315 A194107 * A338027 A025481 A124171
KEYWORD
easy,nonn,tabf
AUTHOR
Antonio Esposito, Jun 06 2002
STATUS
approved