cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

A103391 "Even" fractal sequence for the natural numbers: Deleting every even-indexed term results in the same sequence.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 14, 8, 15, 5, 16, 9, 17, 2, 18, 10, 19, 6, 20, 11, 21, 4, 22, 12, 23, 7, 24, 13, 25, 3, 26, 14, 27, 8, 28, 15, 29, 5, 30, 16, 31, 9, 32, 17, 33, 2, 34, 18, 35, 10, 36, 19, 37, 6, 38, 20, 39, 11, 40, 21, 41, 4, 42, 22, 43, 12, 44, 23, 45, 7, 46, 24, 47, 13, 48, 25, 49, 3, 50, 26, 51, 14, 52, 27, 53, 8
Offset: 1

Views

Author

Eric Rowland, Mar 20 2005

Keywords

Comments

A003602 is the "odd" fractal sequence for the natural numbers.
Lexicographically earliest infinite sequence such that a(i) = a(j) => A348717(A005940(i)) = A348717(A005940(j)) for all i, j >= 1. A365718 is an analogous sequence related to A356867 (Doudna variant D(3)). - Antti Karttunen, Sep 17 2023

Crossrefs

Cf. A003602, A005940, A025480, A220466, A286387, A353368 (Dirichlet inverse).
Cf. also A110962, A110963, A365718.
Differs from A331743(n-1) for the first time at n=192, where a(192) = 97, while A331743(191) = 23.
Differs from A351460.

Programs

  • Haskell
    -- import Data.List (transpose)
    a103391 n = a103391_list !! (n-1)
    a103391_list = 1 : ks where
       ks = concat $ transpose [[2..], ks]
    -- Reinhard Zumkeller, May 23 2013
    
  • Maple
    nmax := 82: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 2 to ceil(nmax/(p+2))+1 do a((2*n-3)*2^p+1) := n od: od: a(1) := 1: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 28 2013
  • Mathematica
    a[n_] := ((n-1)/2^IntegerExponent[n-1, 2] + 3)/2; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 24 2023 *)
  • PARI
    A003602(n) = (n/2^valuation(n, 2)+1)/2; \\ From A003602
    A103391(n) = if(1==n,1,(1+A003602(n-1))); \\ Antti Karttunen, Feb 05 2020
    
  • Python
    def v(n): b = bin(n); return len(b) - len(b.rstrip("0"))
    def b(n): return (n//2**v(n)+1)//2
    def a(n): return 1 if n == 1 else 1 + b(n-1)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, May 29 2022
    
  • Python
    def A103391(n): return (n-1>>(n-1&-n+1).bit_length())+2 if n>1 else 1 # Chai Wah Wu, Jan 04 2024

Formula

For n > 1, a(n) = A003602(n-1) + 1. - Benoit Cloitre, May 26 2007, indexing corrected by Antti Karttunen, Feb 05 2020
a((2*n-3)*2^p+1) = n, p >= 0 and n >= 2, with a(1) = 1. - Johannes W. Meijer, Jan 28 2013
Sum_{k=1..n} a(k) ~ n^2/6. - Amiram Eldar, Sep 24 2023

Extensions

Data section extended up to a(105) (to better differentiate from several nearby sequences) by Antti Karttunen, Feb 05 2020

A351461 Lexicographically earliest infinite sequence such that a(i) = a(j) => A206787(i) = A206787(j) and A336651(i) = A336651(j) for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 8, 2, 12, 7, 13, 4, 14, 8, 11, 1, 15, 9, 15, 5, 16, 10, 17, 3, 18, 11, 19, 6, 20, 8, 15, 2, 21, 12, 22, 7, 23, 13, 22, 4, 24, 14, 25, 8, 26, 11, 27, 1, 28, 15, 29, 9, 30, 15, 22, 5, 31, 16, 32, 10, 30, 17, 24, 3, 33, 18, 28, 11, 34, 19, 35, 6, 36, 20, 37, 8, 38, 15, 35, 2, 39, 21, 40, 12, 41, 22, 42, 7, 43
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A206787(n), A336651(n)], or equally, of sequence b(n) = A291750(A000265(n)).
For all i, j >= 1:
A003602(i) = A003602(j) => A351040(i) = A351040(j) => a(i) = a(j),
A324400(i) = A324400(j) => A351460(i) = A351460(j) => a(i) = a(j),
a(i) = a(j) => A000593(i) = A000593(j),
a(i) = a(j) => A347385(i) = A347385(j),
a(i) = a(j) => A351037(i) = A351037(j) => A347240(i) = A347240(j).
From Antti Karttunen, Nov 23 2023: (Start)
Conjectured to be equal to the lexicographically earliest infinite sequence such that b(i) = b(j) => A000593(i) = A000593(j) and A336467(i) = A336467(j) for all i, j >= 1. In any case, a(i) = a(j) => b(i) = b(j) for all i, j >= 1 [because both A000593(n) and A336467(n) can be computed from the values of A206787(n) and A336651(n)], but whether the implication holds to the opposite direction is still open. Empirically this has been checked up to n = 2^22. See also comment in A351040.
(End)

Crossrefs

Differs from A351037 for the first time at n=103, where a(103) = 42 while A351037(103) = 27.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A206787(n) = sumdiv(n, d, d*(d % 2)*issquarefree(d)); \\ From A206787
    A336651(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i,1],1,f[i,1]^(f[i,2]-1))); };
    Aux351461(n) = [A206787(n), A336651(n)];
    v351461 = rgs_transform(vector(up_to, n, Aux351461(n)));
    A351461(n) = v351461[n];

A351452 Lexicographically earliest infinite sequence such that a(i) = a(j) => A006530(i) = A006530(j) and A278222(i) = A278222(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 14, 8, 15, 5, 16, 9, 17, 2, 18, 10, 19, 6, 20, 11, 21, 4, 22, 12, 23, 7, 24, 13, 25, 3, 19, 14, 26, 8, 27, 15, 28, 5, 29, 16, 30, 9, 31, 17, 32, 2, 33, 18, 34, 10, 35, 19, 36, 6, 37, 20, 24, 11, 38, 21, 39, 4, 40, 22, 41, 12, 42, 23, 43, 7, 44, 24, 45, 13, 46, 25, 47, 3, 48, 19, 49, 14, 50, 26, 51, 8, 52
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A006530(n), A278222(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Crossrefs

Differs from A351454 and A351460 for the first time at n=49, where a(49) = 19, while A351454(49) = A351460(49) = 26.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    Aux351452(n) = [A006530(n), A278222(n)];
    v351452 = rgs_transform(vector(up_to, n, Aux351452(n)));
    A351452(n) = v351452[n];

A351454 Lexicographically earliest infinite sequence such that a(i) = a(j) => A006530(i) = A006530(j), A329697(i) = A329697(j) and A331410(i) = A331410(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 14, 8, 15, 5, 16, 9, 17, 2, 18, 10, 19, 6, 20, 11, 21, 4, 22, 12, 23, 7, 24, 13, 25, 3, 26, 14, 27, 8, 28, 15, 29, 5, 30, 16, 31, 9, 32, 17, 33, 2, 34, 18, 35, 10, 36, 19, 37, 6, 38, 20, 39, 11, 40, 21, 41, 4, 42, 22, 43, 12, 44, 23, 45, 7, 46, 24, 47, 13, 48, 25, 49, 3, 50, 26, 51, 14, 52, 27, 53, 8, 54
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the triplet [A006530(n), A329697(n), A331410(n)], or equally, of the ordered pair [A006530(n), A335880(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Examples

			a(99) = a(121) because 99 = 3^2 * 11 and 121 = 11^2, so they have equal largest prime factor (A006530), and they also agree on A329697(99) = A329697(121) = 4 and on A331410(99) = A331410(121) = 4, therefore they get equal value (which is 51) allotted to them by the restricted growth sequence transform. - _Antti Karttunen_, Feb 14 2022
		

Crossrefs

Cf. also A324400, A336936, A351453.
Differs from A351452 for the first time at n=49, where a(49) = 26, while A351452(49) = 19.
Differs from A351460 for the first time at n=121, where a(121) = 51, while A351460(121) = 62.
Differs from A103391(1+n) for the first time after n=1 at n=121, where a(121) = 51, while A103391(122) = 62.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    Aux351454(n) = [A006530(n), A329697(n), A331410(n)];
    v351454 = rgs_transform(vector(up_to, n, Aux351454(n)));
    A351454(n) = v351454[n];

A351453 Lexicographically earliest infinite sequence such that a(i) = a(j) => A006530(i) = A006530(j) and A007733(i) = A007733(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 4, 2, 9, 6, 10, 4, 11, 7, 12, 3, 13, 8, 14, 5, 15, 4, 16, 2, 7, 9, 17, 6, 18, 10, 8, 4, 19, 11, 20, 7, 21, 12, 22, 3, 23, 13, 9, 8, 24, 14, 25, 5, 10, 15, 26, 4, 27, 16, 11, 2, 8, 7, 28, 9, 29, 17, 30, 6, 31, 18, 13, 10, 32, 8, 33, 4, 34, 19, 35, 11, 9, 20, 15, 7, 36, 21, 8, 12, 37, 22, 38, 3, 39, 23, 32, 13, 40, 9, 41, 8, 17
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A006530(n), A007733(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from A007733
    Aux351453(n) = [A006530(n), A007733(n)];
    v351453 = rgs_transform(vector(up_to, n, Aux351453(n)));
    A351453(n) = v351453[n];
Showing 1-5 of 5 results.