login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309023 For n >= 1, if there exists an m < n such that a(m) = a(n), take the largest such m and set a(n+1) = (n-m)^a(n); otherwise a(n+1) = 0. Start with a(1)=1, a(2)=2. 0
1, 2, 0, 0, 1, 4, 0, 1, 3, 0, 1, 3, 27, 0, 1, 4, 10000, 0, 1, 4, 256, 0, 1, 4, 256 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence quickly generates terms of immense size.
Changing what a(n+1) is set to when a new term arises changes the sequence nontrivially.
LINKS
MATHEMATICA
Nest[Function[{a, n}, Append[a, If[Length@ # == 0, 0, (n - #[[-1, 1]])^Last@ a] &@ Position[Most@ a, _?(# == Last@ a &)] ]] @@ {#, Length@ #} &, {1, 2}, 24] (* Michael De Vlieger, Jul 08 2019 *)
PROG
(Python)
def Prog(length):
L = 2
seq = [1, 2]
while L < length:
x = len(seq)-1
while x > 0:
if seq[-1] == seq[x-1]:
m_minus_n = len(seq)-x
a_n = seq[L-1]
seq.append((m_minus_n)**a_n)
x = -1
else:
x -= 1
if x == 0:
seq.append(0)
L += 1
return seq
CROSSREFS
Cf. A181391.
Sequence in context: A111146 A109077 A355916 * A353429 A137585 A301344
KEYWORD
nonn
AUTHOR
Philip Kalisman, Jul 07 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 22 09:17 EDT 2024. Contains 374485 sequences. (Running on oeis4.)