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.

Previous Showing 11-20 of 23 results. Next

A365715 Lexicographically earliest infinite sequence such that a(i) = a(j) => A365465(i) = A365465(j) for all i, j >= 1, where A365465(n) = A356867(n) / gcd(n, A356867(n)), and A356867 is Sycamore's Doudna variant D(3).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 17 2023

Keywords

Comments

Restricted growth sequence transform of A365465.
Compare to the scatter plots of A365431 (analogous sequence for Doudna variant D(2)), and also of A365393 and A365718.

Crossrefs

Programs

  • PARI
    \\ Needs also program from A356867:
    up_to = 59049; \\ = 3^10.
    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; };
    A365465(n) = (A356867(n)/gcd(n, A356867(n)));
    v365715 = rgs_transform(vector(up_to,n,A365465(n)));
    A365715(n) = v365715[n];

A365717 a(n) is the least k such that A003961^i(k) = A356867(1+n) for some i >= 0, where A003961^i denotes the i-th iterate of prime shift, and A356867 is Sycamore's Doudna variant D(3).

Original entry on oeis.org

1, 2, 2, 2, 4, 6, 10, 8, 4, 2, 14, 6, 4, 20, 12, 50, 16, 18, 6, 28, 30, 8, 40, 24, 100, 32, 8, 2, 22, 10, 10, 44, 42, 70, 56, 12, 4, 98, 18, 12, 140, 60, 250, 80, 36, 18, 196, 150, 16, 200, 48, 500, 64, 54, 6, 110, 30, 20, 88, 84, 350, 112, 90, 8, 490, 54, 24, 280, 120, 1250, 160, 72, 36, 392, 300, 32, 400, 96, 1000
Offset: 0

Views

Author

Antti Karttunen, Sep 17 2023

Keywords

Crossrefs

Cf. A348717, A356867, A365718 (rgs-transform), A365719, A365721, A365722.

Programs

  • PARI
    A348717(n) = if(1==n, 1, my(f = factor(n), k = primepi(f[1, 1])-1); for (i=1, #f~, f[i, 1] = prime(primepi(f[i, 1])-k)); factorback(f));
    A365717(n) = A348717(A356867(1+n)); \\ Needs also program from A356867.

Formula

a(n) = A348717(A356867(1+n)).

A365720 Lexicographically earliest infinite sequence such that a(i) = a(j) => A365719(i) = A365719(j) for all i, j >= 0, where A365719(n) = A046523(A356867(1+n)).

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 4, 5, 3, 2, 4, 4, 3, 6, 6, 6, 7, 6, 4, 6, 8, 5, 9, 9, 10, 11, 5, 2, 4, 4, 4, 6, 8, 8, 9, 6, 3, 6, 6, 6, 12, 12, 9, 13, 10, 6, 10, 12, 7, 14, 13, 14, 15, 9, 4, 8, 8, 6, 9, 12, 12, 13, 12, 5, 12, 9, 9, 16, 16, 13, 17, 14, 10, 14, 18, 11, 19, 17, 20, 21, 7, 2, 4, 4, 4, 6, 8, 8, 9, 6, 4, 8, 8, 6, 12, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Sep 17 2023

Keywords

Comments

Restricted growth sequence transform of A365719.
For all i, j >= 0:
A365718(i) = A365718(j) => a(i) = a(j),
a(i) = a(j) => A365721(i) = A365721(j),
a(i) = a(j) => A365722(i) = A365722(j).

Crossrefs

Cf. A046523, A356867, A365718, A365720 (rgs-transform), A365721, A365722.
Cf. also A286622.

Programs

  • PARI
    up_to = 59049; \\ = 3^10.
    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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    A356867list(up_to) = { my(v=vector(up_to),met=Map(),h=0,ak); for(i=1,#v,if(1==vecsum(digits(i,3)), v[i] = i; h = i, ak = v[i-h]; forprime(p=2,,if(3!=p && !mapisdefined(met,p*ak), v[i] = p*ak; break))); mapput(met,v[i],i)); (v); };
    v365720 = rgs_transform(apply(A046523,A356867list(1+up_to)));
    A365720(n) = v365720[1+n];

A365424 a(1) = 1, a(3^k) = 3 for k >= 1, and for any other n, a(n) is the last prime that is selected when the value of A356867(n) is computed with a greedy algorithm.

Original entry on oeis.org

1, 2, 3, 5, 2, 2, 2, 2, 3, 7, 7, 5, 5, 5, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 2, 2, 3, 11, 11, 7, 11, 11, 7, 7, 7, 5, 7, 7, 5, 7, 7, 5, 5, 5, 2, 7, 7, 5, 5, 5, 2, 5, 2, 2, 7, 5, 5, 5, 2, 2, 5, 2, 2, 7, 5, 5, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 2, 2, 3, 13, 13, 11, 13, 13, 11, 13, 13, 7, 13, 11, 11, 13, 11, 11, 11, 11, 7
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2023

Keywords

Comments

Apparently the analogous sequence for Doudna variant D(2) (A005940) is 1 followed by A000040(A290251(n-1)) for n >= 2: 1, 2, 3, 2, 5, 3, 3, 2, 7, 5, 5, 3, 5, 3, 3, 2, 11, 7, 7, 5, 7, etc.

Crossrefs

Cf. A000040, A000244 (positions of the initial 1 and all 3's), A053735, A356867, A365459.
Cf. also A005940, A290251.

Programs

  • PARI
    up_to = (3^10);
    A365424list(up_to) = { my(v=vector(up_to),pv=vector(up_to),met=Map(),h=0,ak); for(i=1,#v,if(1==sumdigits(i,3), v[i] = i; pv[i] = if(1==i,i,3); h = i, ak = v[i-h]; forprime(p=2,,if(3!=p && !mapisdefined(met,p*ak), v[i] = p*ak; pv[i] = p; break))); mapput(met,v[i],i)); (pv); };
    v365424 = A365424list(up_to);
    A365424(n) = v365424[n];

Formula

a(1) = 1, and for n > 1, if n is of the form 3^k, then a(n) = 3, otherwise a(n) = A356867(n) / A356867(A365459(n)).

A369060 LCM-transform of Sycamore's D(3) variant of Doudna sequence (A356867).

Original entry on oeis.org

1, 2, 3, 5, 2, 1, 1, 2, 3, 7, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 5, 1, 1, 1, 2, 3, 11, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 2, 3, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Jan 13 2024

Keywords

Comments

See discussion at A368900.

Crossrefs

Programs

  • PARI
    up_to = 3^9; \\ Checked up to (3^12)
    A356867list(up_to) = { my(v=vector(up_to),met=Map(),h=0,ak); for(i=1,#v,if(1==sumdigits(i,3), v[i] = i; h = i, ak = v[i-h]; forprime(p=2,,if(3!=p && !mapisdefined(met,p*ak), v[i] = p*ak; break))); mapput(met,v[i],i)); (v); };
    v356867 = A356867list(up_to);
    A356867(n) = v356867[n];
    LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); };
    v369060 = LCMtransform(v356867);
    A369060(n) = v369060[n];
    A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };

Formula

a(n) = lcm {1..A356867(n)} / lcm {1..A356867(n-1)}.
a(n) = A014963(A356867(n)). [This holds because A356867 satisfies the property S explained in A368900]

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

A368900 LCM-transform of Doudna sequence.

Original entry on oeis.org

1, 2, 3, 2, 5, 1, 3, 2, 7, 1, 1, 1, 5, 1, 3, 2, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Let's define "property S" for sequences as follows: If s is any sequence of positive natural numbers, normalized to begin with offset 1, then it satisfies the S-property if LCM-transform(s) is equal to the sequence obtained by applying A014963 to sequence s, or in other words, when for all n >= 1, lcm {s(1)..s(n)} / lcm {s(1)..s(n-1)} = A014963(s(n)). This holds if and only if, for all n >= 1, when, either (case A): s(n) is of the form p^k, p prime, then gcd(s(n), lcm {s(1)..s(n-1)}) must be equal to p^(k-1), or (case B): when s(n) is not a prime power, then gcd(s(n), lcm {s(1)..s(n-1)}) must be equal to s(n). Together the cases (A) and (B) reduce to the condition that each prime power should appear in s before any of its multiples do.
Clearly the Doudna-sequence satisfies the property by the way of its construction, as do many of its variants like A356867 (see A369060).
Also, for any base-2 related permutation b that keeps all the numbers of range [2^k, 2^(1+k)[ in the same range, i.e., if for all n >= 1, A000523(b(n)) = A000523(n), then the above property is automatically satisfied.
Furthermore, because in Doudna-sequence no multiple of any term is located on the same row as the term itself (see the tree-illustration in A005940), it follows that any composition of A005940 with any such base-2 related permutation as mentioned above also automatically satisfies the S-property, for example, the permutations A163511, A243353, A253563, A253565, A366260, A366263 and A366275.
Note: Like A005940 itself, also this sequence might be more logical with the starting offset 0 instead of 1, to better align with the underlying mapping from the binary expansion of n to the prime factorization. - Antti Karttunen, Jan 24 2024

Crossrefs

List of LCM-transforms of permutations (permutation given in parentheses):
Cf. A265576 (A064413; note that the EKG sequence permutation does not satisfy the S-property).
In all following cases, the permutation satisfies the S-property:
Cf. A369041 (A003188), A369042 (A006068), A369043 (A193231), A369044 (A057889), A369041 (A054429). [Base-2 related permutations]
Other permutations that have the same property: A303767, (and when used as an offset=1 sequence): A052330.

Programs

  • Mathematica
    nn = 120; Array[Set[{s[#], a[#]}, {#, #}] &, 2]; j = 2;
    Do[If[EvenQ[n],
      Set[s[n], 2 s[n/2]],
      Set[s[n],
        Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &,
          FactorInteger[s[(n + 1)/2]]]]];
      k = LCM[j, s[n]]; a[n] = k/j; j = k, {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Mar 24 2024 *)
  • PARI
    up_to = 16384;
    LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t) };
    v368900 = LCMtransform(vector(up_to,i,A005940(i)));
    A368900(n) = v368900[n];
    
  • PARI
    A000265(n) = (n>>valuation(n,2));
    A209229(n) = (n && !bitand(n,n-1));
    A368900(n)  = if(1==n, 1, my(x=A000265(n-1)); if(A209229(1+x), prime(1+valuation(n-1,2)), 1));

Formula

a(n) = A368901(n) / A368901(n-1) = lcm {1..A005940(n)} / lcm {1..A005940(n-1)}.
a(n) = A005940(n) / gcd(A005940(n), A368901(n-1)).
a(n) = A014963(A005940(n)). [Because A005940 satisfies the property given in the comments]
For n >= 1, Product_{d|n} a(A005941(d)) = n. [Implied by above]
For n >= 1, a(n) = A369030(1+A054429(n-1)).
For n > 1, if n-1 is a number of the form 2^i - 2^j with i >= j, then a(n) = prime(1+j), otherwise a(n) = 1.

A364611 For p = 5 and n > 0, write n = p^m + k, m >= 0, with maximal p^m <= n, with 0 <= k < p^(m+1) - p^m, then for n such that k=0, a(n)=n, and for n such that k > 0, a(n) is the smallest q*a(k), prime q != p, that is not already a term.

Original entry on oeis.org

1, 2, 4, 8, 5, 3, 6, 12, 16, 10, 9, 18, 24, 32, 20, 27, 36, 48, 64, 40, 54, 72, 96, 128, 25, 7, 14, 28, 56, 15, 21, 42, 84, 112, 30, 63, 126, 168, 224, 60, 81, 108, 144, 192, 80, 162, 216, 288, 256, 50, 49, 98, 196, 392, 45, 147, 294, 252, 336, 90, 189, 378, 504
Offset: 1

Views

Author

Michael De Vlieger, Sep 16 2023

Keywords

Comments

This is sequence D(p), p = 5, where the Doudna sequence A005940 = D(2).

Crossrefs

Cf. A005940 (D(2)), A356867 (D(3)), A364628 (D(7)).

Programs

  • Mathematica
    p = 5; nn = 125; c[_] = False;
    Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}];
      If[k == 0,
       Set[{a[n], c[n]}, {n, True}],
       While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++];
       Set[{a[n], c[t]}, {t, True}]], {n, nn}];
    Array[a, nn]

A364628 For p = 7 and n > 0, write n = p^m + k, m >= 0, with maximal p^m <= n, with 0 <= k < p^(m+1) - p^m, then for n such that k=0, a(n)=n, and for n such that k > 0, a(n) is the smallest q*a(k), prime q != p, that is not already a term.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 7, 3, 6, 12, 24, 48, 64, 14, 9, 18, 36, 72, 96, 128, 28, 27, 54, 108, 144, 192, 256, 56, 81, 162, 216, 288, 384, 512, 112, 243, 324, 432, 576, 768, 1024, 224, 486, 648, 864, 1152, 1536, 2048, 49, 5, 10, 20, 40, 80, 160, 21, 15, 30, 60, 120
Offset: 1

Views

Author

Michael De Vlieger, Sep 16 2023

Keywords

Comments

This is sequence D(p), p = 7, where the Doudna sequence A005940 is D(2).

Crossrefs

Cf. A005940 (D(2)), A356867 (D(3)), A364611 (D(5)).

Programs

  • Mathematica
    p = 7; nn = 343; c[_] = False;
    Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}];
      If[k == 0,
       Set[{a[n], c[n]}, {n, True}],
       While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++];
       Set[{a[n], c[t]}, {t, True}]], {n, nn}];
    Array[a, nn]

A364957 Dirichlet inverse of A365463.

Original entry on oeis.org

1, -2, -3, 3, -1, 6, -1, -12, 0, 3, -1, -9, -1, 2, 3, 35, -1, 0, -1, -10, 3, 3, -1, 36, -24, 2, 0, -3, -1, -9, -1, -82, 3, 2, -5, 0, -1, 2, 3, 37, -1, -6, -1, -10, 0, 3, -1, -105, 0, 46, 3, -6, -1, 0, -9, 18, 3, 3, -1, 30, -1, 2, 0, 226, -3, -9, -1, -6, 3, 12, -1, 0, -1, 2, 72, -3, 1, -6, -1, -127, 0, 3, -1, 9, -3, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2023

Keywords

Crossrefs

Cf. also A364257.

Programs

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA365463(n/d) * a(d).
Previous Showing 11-20 of 23 results. Next