login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071797 Restart counting after each new odd integer (a fractal sequence). 18
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 (list; graph; refs; listen; history; text; internal format)
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

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..1000

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.

F. Smarandache, Only Problems, Not Solutions!, Phoenix,AZ: Xiquan,1993.

Michael Somos, Sequences used for indexing triangular or square arrays

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. A002260, A004737, A006590, A027052, A071028, A078358, A078446.

Cf. A074294.

Sequence in context: A274641 A003315 A194107 * A338027 A025481 A124171

Adjacent sequences:  A071794 A071795 A071796 * A071798 A071799 A071800

KEYWORD

easy,nonn,tabf

AUTHOR

Antonio Esposito (antonio.b.esposito(AT)italtel.it), Jun 06 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 02:23 EDT 2021. Contains 343808 sequences. (Running on oeis4.)