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!)
A350560 Denominators of the fractional, multiplicative Van Eck Sequence f(n): for n >= 2, if there exists an m < n such that f(m) = f(n), take the largest such m. If f(n)=1, set f(n+1) = 1/(n-m); otherwise, if f(n) != 1, set f(n+1) = f(n)+f(m)*(n-m). If no m exists such that f(m) = f(n), then set f(n+1)=1. Start with f(1)=1 and f(2)=0. a(n) = denominator(f(n)). 1
1, 1, 1, 2, 1, 2, 2, 1, 3, 1, 2, 1, 1, 3, 1, 1, 3, 3, 1, 3, 3, 3, 1, 4, 1, 2, 1, 1, 3, 3, 1, 3, 3, 3, 1, 4, 4, 1, 3, 3, 1, 3, 3, 3, 1, 4, 4, 1, 3, 3, 3, 1, 4, 1, 1, 1, 4, 4, 1, 3, 1, 1, 3, 3, 3, 1, 1, 5, 1, 2, 2, 1, 3, 3, 1, 3, 3, 3, 1, 4, 1, 1, 3, 3, 3, 1, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
f(n) = [ 1, 0, 1, 1/2, 1, 1/2, 3/2, 1, ... ]
MATHEMATICA
f[1]=1; f[n_]:=0; f2[n_]:=0; a[n_]:=Block[{q=f2[x]}, If[q!=0, If[x==1, s[n]=1/(n-1-q), s[n]=((n-1-q)*(x))+x], s[n]=1]]; s[1]=1; s[2]=0; x=0; Do[x=a[n]; f2[x]=f[x]; f[x]=n, {n, 3, 100000}]; data=Denominator/@Table[s[n], {n, 1, 100000}];
PROG
(Python)
from fractions import Fraction
from itertools import count, islice
def rfind(lst, item): # find item in list before last index
idx = len(lst) - 2
while lst[idx] != None and lst[idx] != item: idx -= 1
return idx
def agen(): # generator of terms
f = [None, Fraction(1, 1), Fraction(0, 1)]
yield from [1, 1]
for n in count(2):
m = rfind(f, f[n])
if m > 0: fp = Fraction(1, n-m) if f[n] == 1 else f[n] + f[m]*(n-m)
else: fp = Fraction(1, 1)
f.append(fp)
yield fp.denominator
print(list(islice(agen(), 87))) # Michael S. Branicky, Jan 16 2022
(PARI) findm(list, n) = {forstep (m=n-1, 1, -1, if (list[m] == list[n], return(m))); return(0); }
listf(nn) = {my(list = List([1, 0])); for (n=3, nn, my(m = findm(list, n-1)); if (m, if (list[m] == 1, listput(list, 1/(n-1-m)), listput(list, list[n-1]*(n-m))), listput(list, 1); ); ); Vec(list); }
listden(nn) = apply(denominator, listf(nn)); \\ Michel Marcus, Jan 17 2022
CROSSREFS
Cf. A350228, A350559 (numerators).
Sequence in context: A336534 A271852 A224362 * A050362 A095686 A105258
KEYWORD
nonn,frac
AUTHOR
Jasmine Miller, Jan 05 2022
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 June 23 17:30 EDT 2024. Contains 373653 sequences. (Running on oeis4.)