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-4 of 4 results.

A322808 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is a squarefree number > 2, and f(n) = A097246(n) for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A097249(i) = A097249(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; };
    A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); };
    A322808aux(n) = if((n>2)&&issquarefree(n),0,A097246(n));
    v322808 = rgs_transform(vector(up_to,n,A322808aux(n)));
    A322808(n) = v322808[n];

A322810 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd squarefree number > 1, and f(n) = n for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Comments

For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A305980(i) = A305980(j),
a(i) = a(j) => A322808(i) = A322808(j).

Crossrefs

Cf. A056911 (after the initial 1, gives the positions of 3's in this sequence).

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; };
    A322810aux(n) = if((n>1)&&(n%2)&&issquarefree(n),0,n);
    v322810 = rgs_transform(vector(up_to,n,A322810aux(n)));
    A322810(n) = v322810[n];

Formula

a(1) = 1, a(2) = 2, for n > 2, if n is an odd squarefree number (in A056911), a(n) = 3, otherwise a(n) = running count from 4 onward.

A105570 Nonsquarefree numbers in place: a(n) = n if n is not squarefree, 0 otherwise.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 12, 0, 0, 0, 16, 0, 18, 0, 20, 0, 0, 0, 24, 25, 0, 27, 28, 0, 0, 0, 32, 0, 0, 0, 36, 0, 0, 0, 40, 0, 0, 0, 44, 45, 0, 0, 48, 49, 50, 0, 52, 0, 54, 0, 56, 0, 0, 0, 60, 0, 0, 63, 64, 0, 0, 0, 68, 0, 0, 0, 72, 0, 0, 75, 76, 0, 0, 0, 80, 81, 0, 0, 84, 0, 0, 0, 88, 0
Offset: 0

Views

Author

Paul Barry, Apr 14 2005

Keywords

Crossrefs

Programs

Formula

a(n) = n - abs(mu(n))*n.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1 - 1/zeta(2))/2 = 0.1960364490... . - Amiram Eldar, Feb 22 2024

A346488 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), for all i, j >= 1, where f(n) = 0 if mu(n) = -1, and f(n) = n for all other numbers (with mu = Möbius mu, A008683).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 2, 2, 21, 22, 23, 24, 25, 2, 26, 27, 28, 2, 2, 2, 29, 30, 31, 2, 32, 33, 34, 35, 36, 2, 37, 38, 39, 40, 41, 2, 42, 2, 43, 44, 45, 46, 2, 2, 47, 48, 2, 2, 49, 2, 50, 51, 52, 53, 2, 2, 54, 55, 56, 2, 57, 58, 59, 60, 61, 2, 62, 63, 64, 65, 66, 67, 68, 2, 69, 70, 71
Offset: 1

Views

Author

Antti Karttunen, Aug 20 2021

Keywords

Comments

Restricted growth sequence transform of the sequence f(n) = 0 if mu(n) = -1, and f(n) = n for mu(n) >= 0.
For all i, j:
A305800(i) = A305800(j) => a(i) = a(j) => A305980(i) = A305980(j),
a(i) = a(j) => b(i) = b(j), where b is the pointwise sum of any two multiplicative sequences c and d that are Dirichlet inverses of each other. For example, b can be a sequence like A319340, A323885, or A347094.

Crossrefs

Cf. A008683, A070549, A030059 (positions of 2's).

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; };
    Aux346488(n) = if(moebius(n)<0,0,n);
    v346488 = rgs_transform(vector(up_to, n, Aux346488(n)));
    A346488(n) = v346488[n];
    
  • PARI
    A070549(n) = sum(k=1,n,(-1==moebius(k)));
    A346488(n) = if(1==n,1,if(-1==moebius(n),2,1+n-A070549(n)));

Formula

a(1) = 1, and for n > 1, if A008683(n) = -1, a(n) = 2, otherwise a(n) = 1 + n - A070549(n).
Showing 1-4 of 4 results.