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 101-110 of 154 results. Next

A353368 Dirichlet inverse of A103391, "even fractal sequence".

Original entry on oeis.org

1, -2, -2, 1, -2, 4, -3, -1, 2, 2, -4, -3, -3, 4, 3, 0, -2, -10, -6, 1, 8, 4, -7, 3, 1, -2, -8, -1, -5, -4, -9, -1, 14, -10, 2, 17, -6, 4, 1, -1, -4, -22, -12, 1, -3, 4, -13, -1, 6, -14, -6, 11, -8, 28, 1, 1, 19, -10, -16, 3, -9, 4, -25, -1, 10, -42, -18, 25, 18, 0, -19, -17, -6, -14, -12, 5, 13, 12, -21, 3, 24
Offset: 1

Views

Author

Antti Karttunen, Apr 18 2022

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA003602(n) = (n/2^valuation(n, 2)+1)/2; \\ From A003602
    A103391(n) = if(1==n,1,(1+A003602(n-1)));
    v353368 = DirInverseCorrect(vector(up_to,n,A103391(n)));
    A353368(n) = v353368[n];

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A103391(n/d) * a(d).
a(n) = A353369(n) - A103391(n).

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 03 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A331410(n), A365385(n)].
For all i, j: A365388(i) = A365388(j) => a(i) = a(j) => A365387(i) = A365387(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; };
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    A365385(n) = A331410(A163511(n));
    A365386aux(n) = [A331410(n),A365385(n)];
    v365386 = rgs_transform(vector(up_to,n,A365386aux(n)));
    A365386(n) = v365386[n];

A365395 Lexicographically earliest infinite sequence such that a(i) = a(j) => A365425(i) = A365425(j) and A365427(i) = A365427(j) for all i, j >= 0.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 2, 1, 8, 5, 9, 3, 10, 6, 3, 2, 11, 7, 7, 4, 12, 2, 4, 1, 13, 8, 14, 5, 15, 9, 5, 3, 16, 10, 11, 6, 17, 3, 6, 2, 18, 11, 10, 7, 19, 7, 7, 4, 17, 12, 20, 2, 7, 4, 21, 1, 22, 13, 23, 8, 24, 14, 8, 5, 25, 15, 18, 9, 26, 5, 9, 3, 27, 16, 16, 10, 28, 11, 10, 6, 29, 17, 30, 3, 10, 6
Offset: 0

Views

Author

Antti Karttunen, Sep 04 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A365425(n), A365427(n)].
Restricted growth sequence transform of the function f(n) = A336390(A163511(n)).
For all i, j: a(i) = a(j) => A365385(i) = A365385(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; };
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A365425(n) = A046523(A000265(A163511(n)));
    A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
    A365427(n) = A336467(A163511(n));
    A365395aux(n) = [A365425(n), A365427(n)];
    v365395 = rgs_transform(vector(1+up_to,n,A365395aux(n-1)));
    A365395(n) = v365395[1+n];

Formula

For all n >= 1, a(n) = a(2*n) = a(A000265(n)).

A379006 Ordinal transform of A355582, where A355582 is the largest 5-smooth divisor of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 4, 2, 1, 1, 5, 1, 6, 1, 2, 3, 7, 1, 1, 4, 1, 2, 8, 1, 9, 1, 3, 5, 2, 1, 10, 6, 4, 1, 11, 2, 12, 3, 1, 7, 13, 1, 14, 1, 5, 4, 15, 1, 3, 2, 6, 8, 16, 1, 17, 9, 2, 1, 4, 3, 18, 5, 7, 2, 19, 1, 20, 10, 1, 6, 21, 4, 22, 1, 1, 11, 23, 2, 5, 12, 8, 3, 24, 1, 25, 7, 9, 13, 6, 1, 26, 14, 3, 1, 27, 5, 28, 4, 2
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2024

Keywords

Crossrefs

Cf. A355582.
Cf. A379005 (ordinal transform).
Cf. also A003602, A126760.

Programs

  • PARI
    up_to = 20000;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    is_A051037(n) = (n<7||vecmax(factor(n, 6)[, 1])<7); \\ From A051037
    A355582(n) = fordiv(n,d,if(is_A051037(n/d),return(n/d)));
    v379006 = ordinal_transform(vector(up_to, n, A355582(n)));
    A379006(n) = v379006[n];

A382357 Lexicographically earliest sequence of distinct positive integers such that the 2-adic valuations of adjacent terms differ exactly by one.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 12, 10, 5, 14, 7, 18, 9, 22, 11, 26, 13, 30, 15, 34, 17, 38, 19, 42, 20, 24, 16, 32, 48, 40, 28, 46, 21, 50, 23, 54, 25, 58, 27, 62, 29, 66, 31, 70, 33, 74, 35, 78, 36, 56, 44, 72, 52, 82, 37, 86, 39, 90, 41, 94, 43, 98, 45, 102, 47, 106, 49
Offset: 1

Views

Author

Rémy Sigrist, Mar 22 2025

Keywords

Comments

The first term with a given 2-adic valuation, say k, is necessarily 2^k.
Empirically, powers of two appear as pairs of consecutive terms.
We cannot have three consecutive powers of 2: if a(n) = 2^k and a(n+1) = 2^(k+1) then a(n+2) <= 3*2^k < 2^(k+2).
All powers of two appear in the sequence:
- by contradiction: if 2^m is missing, then the 2-adic valuation of the terms of the sequence is bounded by m,
- by necessity, we have some k < m such that all the integers with 2-adic valuation k appear in the sequence,
- hence all integers with 2-adic valuation k+1 (and k-1 provided k > 0) will appear in the sequence,
- gradually, all integers with 2-adic valuation k+2, k+3, etc. and eventually 2^m, will appear, a contradiction.
Conjecture: this sequence is a permutation of the positive integers.
The fact that A007814 contains every positive integer infinitely many times is not sufficient to guarantee that the present sequence is a permutation of the positive integers (the variant based on A003602 instead of A007814 contains only finitely many even numbers, and so is not a permutation of the positive integers, although A003602 contains every positive integer infinitely many times).

Examples

			The initial terms are:
  n   a(n)  A007814(a(n))
  --  ----  -------------
   1     1              0
   2     2              1
   3     3              0
   4     6              1
   5     4              2
   6     8              3
   7    12              2
   8    10              1
   9     5              0
  10    14              1
  11     7              0
  12    18              1
  13     9              0
  14    22              1
  15    11              0
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A089265 a(1) = 0; thereafter a(2*n) = a(n) + 1, a(2*n+1) = 2*n.

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 6, 3, 8, 5, 10, 4, 12, 7, 14, 4, 16, 9, 18, 6, 20, 11, 22, 5, 24, 13, 26, 8, 28, 15, 30, 5, 32, 17, 34, 10, 36, 19, 38, 7, 40, 21, 42, 12, 44, 23, 46, 6, 48, 25, 50, 14, 52, 27, 54, 9, 56, 29, 58, 16, 60, 31, 62, 6, 64, 33, 66, 18, 68, 35, 70, 11, 72
Offset: 1

Views

Author

Ralf Stephan, Oct 30 2003

Keywords

Comments

In the binary representation of n, swallow all zeros from the right, then add the number of swallowed zeros, and subtract 1. - Ralf Stephan, Aug 22 2013

Crossrefs

First differences of A005766.

Programs

  • Maple
    nmax:=73: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := p  + 2*(n-1) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 23 2013
  • Mathematica
    a[n_] := With[{v = IntegerExponent[n, 2]}, v + n/2^v - 1];
    Array[a, 100] (* Jean-François Alcover, Feb 28 2019 *)
  • PARI
    a(n) = valuation(n,2) + n/2^valuation(n,2) - 1

Formula

a(1) = 0; thereafter a(2*n) = a(n) + 1, a(2*n+1) = 2*n.
a(n) = A007814(n) + 2*A025480(n-1) = A007814(n) + A000265(n) - 1.
G.f.: sum(k>=0, (t^2+2t^3-t^4)/(1-t^2)^2, t=(x^2)^k).
a((2*n-1)*2^p) = p + 2*(n-1), p >= 0. - Johannes W. Meijer, Jan 23 2013

A110962 Fractalization of A025480, zero-based version of Kimberling's paraphrases sequence.

Original entry on oeis.org

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

Views

Author

Alexandre Wajnberg, Sep 26 2005

Keywords

Comments

Self-descriptive sequence: the terms at odd indices are the sequence itself, while the terms at even indices (the skeleton of this sequence) are the terms of A025480, which is a zero-based sequence of Kimberling's paraphrases sequence, A003602.

Crossrefs

One less than A110963 (note also the different starting offsets).

Programs

Formula

For even n, a(n) = A025480(n/2), for odd n, a(n) = a((n-1)/2). - Antti Karttunen, Apr 18 2022
a(2n+1) = a(4n+3) = a(n).
a(2n) = a(4n+1) = a(4n+2) = A025480(n/2).
a(4n) = a(8n+1) = a(8n+2) = n.
a(n) = A110963(1+n) - 1.

Extensions

Entry edited and more terms added by Antti Karttunen, Apr 18 2022

A123390 Triangle read by rows: n-th row starts with n and continues with half the previous value as long as that is even.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A fractal sequence, generated by the rule a(n) is a new maximum when a(n-1) is odd and a repetition of an earlier value when a(n-1) is even.
From Flávio V. Fernandes, Mar 13 2025: (Start)
a(n) is given by A003602(n) at A001511(n) diagram
1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9
. 1 . . . 2 . . . 3 . . . 4 . . .
. . . 1 . . . . . . . 2 . . . . .
. . . . . . . 1 . . . . . . . . .
. . . . . . . . . . . . . . . 1 .
read by backwards 2^n, which is given by A118319(n) at A001511(n) diagram
1 . 2 . 4 . 5 . 8 . 9 .11 .12 .16
. 3 . . . 6 . . .10 . . .13 . . .
. . . 7 . . . . . . .14 . . . . .
. . . . . . .15 . . . . . . . . .
. . . . . . . . . . . . . . .31 . - see formula. (End)

Examples

			Triangle starts
  1;
  2, 1;
  3;
  4, 2, 1;
  5;
  6, 3;
  7;
  8, 4, 2, 1;
  9;
  10, 5;
  11;
  12, 6, 3;
  13;
		

Crossrefs

Row lengths are A001511.
Row sums give A129527.
Cf. A120385.

Programs

  • Maple
    T:= proc(n) local m,l; m:=n; l:= m;
          while irem(m, 2, 'm')=0 do l:=l,m od: l
        end:
    seq(T(n), n=1..40);  # Alois P. Heinz, Oct 09 2015
  • Mathematica
    Flatten[Function[n, NestWhile[Append[#, Last[#]/2] &, {n}, EvenQ[Last[#]] &]][#] & /@ Range[20]] (* Birkas Gyorgy, Apr 13 2011 *)

Formula

a(1) = 1, for n > 1, if a(n-1) is even, a(n) = a(n-1)/2, otherwise a(n) = (max_{k
Ordinal transform of A082850.
a(n) = A003602(A108918(n)). - Flávio V. Fernandes, Mar 13 2025

A336392 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A336467(i) = A336467(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, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 3, 9, 6, 5, 17, 10, 18, 3, 19, 11, 20, 6, 21, 12, 22, 2, 23, 13, 24, 7, 25, 14, 26, 4, 27, 15, 28, 8, 29, 16, 30, 1, 31, 3, 32, 9, 33, 6, 34, 5, 35, 17, 36, 10, 21, 18, 37, 3, 11, 19, 38, 11, 39, 20, 40, 6, 41, 21, 42, 12, 43, 22, 44, 2, 45, 23, 46, 13
Offset: 1

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A278222(n), A336467(n)].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(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; };
    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));
    A000265(n) = (n>>valuation(n,2));
    A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
    Aux336392(n) = [A278222(n), A336467(n)];
    v336392 = rgs_transform(vector(up_to, n, Aux336392(n)));
    A336392(n) = v336392[n];

A336393 Lexicographically earliest infinite sequence such that a(i) = a(j) => A336467(i) = A336467(j) and A278221(A000265(i)) = A278221(A000265(j)), for all i, j >= 1.

Original entry on oeis.org

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

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A336467(n), A278221(A000265(n))], or equally, of the ordered pair [A336467(n), A336395(n)].
For all i, j:
A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

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; };
    A000265(n) = (n>>valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A122111(n) = if(1==n,n,my(f=factor(n), es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,m=1); for(i=1, #es, pri += es[i]; m *= prime(pri)^(is[i]-is[1+i])); (m));
    A278221(n) = A046523(A122111(n));
    A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
    Aux336393(n) = [A336467(n), A278221(A000265(n))];
    v336393 = rgs_transform(vector(up_to, n, Aux336393(n)));
    A336393(n) = v336393[n];
Previous Showing 101-110 of 154 results. Next