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.

A294877 Lexicographically earliest such sequence a that a(i) = a(j) => A003557(i) = A003557(j) and A046523(i) = A046523(j), for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Comments

Restricted growth sequence transform of A291757, which means that this is the lexicographically least sequence a, such that for all i, j: a(i) = a(j) <=> A291757(i) = A291757(j) <=> A003557(i) = A003557(j) and A046523(i) = A046523(j). That this is equal to the definition given in the title follows because any such lexicographically least sequence satisfying relation <=> is also the least sequence satisfying relation => with the same parameters.
Also the restricted growth sequence transform of A294876, Product_{d|n, d>1} prime(gcd(d,n/d)). (This was the original definition).
For all i, j:
A295300(i) = A295300(j) => a(i) = a(j),
A319347(i) = A319347(j) => a(i) = a(j),
a(i) = a(j) => A055155(i) = A055155(j).

Crossrefs

Cf. A000188, A055155, A294897, A295666, A322020 (a few of the matched sequences).

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; };
    A294876(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(gcd(d,n/d)))); m; };
    v294877 = rgs_transform(vector(up_to,n,A294876(n)));
    A294877(n) = v294877[n];
    
  • PARI
    A003557(n) = n/factorback(factor(n)[, 1]); \\ From A003557
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v294877 = rgs_transform(vector(up_to,n,[A003557(n),A046523(n)]));
    A294877(n) = v294877[n]; \\ Antti Karttunen, Nov 28 2018

Extensions

Name changed and comments added by Antti Karttunen, Nov 28 2018

A295879 Multiplicative with a(p) = 1, a(p^e) = prime(e-1) if e > 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2017

Keywords

Comments

This sequence can be used as a filter. It matches at least to the following sequences related to the counting of various non-unitary prime divisors:
For all i, j:
a(i) = a(j) => A056170(i) = A056170(j), as A056170(n) = A001222(a(n)).
a(i) = a(j) => A162641(i) = A162641(j).
a(i) = a(j) => A295659(i) = A295659(j).
a(i) = a(j) => A295662(i) = A295662(j).
a(i) = a(j) => A295883(i) = A295883(j), as A295883(n) = A007949(a(n)).
a(i) = a(j) => A295884(i) = A295884(j).
An encoding of the prime signature of A057521(n), the powerful part of n. - Peter Munn, Apr 06 2024

Crossrefs

Differs from A000688 for the first time at n=128, where a(128) = 13, while A000688(128) = 15.

Programs

  • Mathematica
    Array[Apply[Times, FactorInteger[#] /. {p_, e_} /; p > 0 :> Which[p == 1, 1, e == 1, 1, True, Prime[e - 1]]] &, 128] (* Michael De Vlieger, Nov 29 2017 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2] == 1, 1, prime(f[i,2]-1)));} \\ Amiram Eldar, Nov 18 2022

Formula

a(1) = 1; for n>1, if n = Product prime(i)^e(i), then a(n) = Product A008578(e(i)).
a(n) = A064989(A181819(n)).
a(n) = A181819(A003557(n)). - Antti Karttunen, Apr 03 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 + 1/p^2 + Sum_{k>=1} (prime(k+1)-prime(k))/p^(k+2)) = 2.208... . - Amiram Eldar, Nov 18 2022

A294895 a(n) = Product_{d|n, gcd(d,n/d)>1} prime(gcd(d,n/d)-1).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 4, 1, 1, 1, 20, 1, 9, 1, 4, 1, 1, 1, 16, 7, 1, 9, 4, 1, 1, 1, 100, 1, 1, 1, 396, 1, 1, 1, 16, 1, 1, 1, 4, 9, 1, 1, 400, 13, 49, 1, 4, 1, 81, 1, 16, 1, 1, 1, 16, 1, 1, 9, 1700, 1, 1, 1, 4, 1, 1, 1, 17424, 1, 1, 49, 4, 1, 1, 1, 400, 171, 1, 1, 16, 1, 1, 1, 16, 1, 81, 1, 4, 1, 1, 1, 10000, 1, 169, 9, 4508, 1, 1, 1, 16, 1
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2017

Keywords

Comments

For all i, j: a(i) = a(j) => A294897(i) = A294897(j).

Crossrefs

Cf. A005117 (the positions of ones).

Programs

  • Mathematica
    A294895[n_] := Times @@ Prime[Select[Map[GCD[#, n/#] &, Divisors[n]], #>1 &] - 1];
    Array[A294895, 100] (* Paolo Xausa, Feb 22 2024 *)
  • PARI
    A294895(n) = { my(m=1); fordiv(n,d,if(gcd(d,n/d)>1, m *= prime(gcd(d,n/d)-1))); m; };

Formula

a(n) = Product_{d|n} A008578(gcd(d,n/d)).
a(n) = A064989(A294876(n)).
For n >= 1, A001222(a(n)) = A048105(n).
For n > 1, 1+A061395(a(n)) = A000188(n).

A297174 An auxiliary sequence for computing A300250. See comments and examples.

Original entry on oeis.org

0, 1, 1, 5, 1, 19, 1, 69, 5, 19, 1, 2123, 1, 19, 19, 4165, 1, 2131, 1, 2125, 19, 19, 1, 4228171, 5, 19, 69, 2125, 1, 526631, 1, 2101317, 19, 19, 19, 268706123, 1, 19, 19, 4228237, 1, 526643, 1, 2125, 2123, 19, 1, 550026380363, 5, 2131, 19, 2125, 1, 4229203, 19, 4228237, 19, 19, 1, 8798249190555, 1, 19, 2123, 17181970501, 19, 526643, 1, 2125
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2018

Keywords

Comments

In binary representation of a(n), the distances between successive 1's (one more than the lengths of intermediate 0-runs) from the right record the prime signature ranks (A101296) of successive divisors of n, as ordered from the smallest divisor (> 1) to the largest divisor (= n).

Examples

			a(1) = 0 by convention (as 1 has no prime divisors).
a(p) = 1 for any prime p.
For any n > 1, the least significant 1-bit is at rightmost position (bit-0), signifying the smallest prime factor of n, which is always the least divisor > 1.
For n = 4 = 2*2, the next divisor of 4 after 2 is 4, for which A101296(4) = 3, thus the second least significant 1-bit comes 3-1 = 2 positions left of the rightmost 1, thus a(4) = 2^0 + 2^(3-1) = 1+4 = 5.
For n = 6 with divisors d = 2, 3 and 6 larger than one, for which A101296(d)-1 gives 1, 1 and 3, thus a(6) = 2^(1-1) + 2^(1-1+1) + 2^(1-1+1+3) = 2^0 + 2^1 + 2^4 = 19.
For n = 12 with divisors d = 2, 3, 2*2, 2*3, 2*2*3 larger than one, A101296(d)-1 gives 1, 1, 2, 3 and 5 thus a(12) = 2^0 + 2^(0+1) + 2^(0+1+2) + 2^(0+1+2+3) + 2^(0+1+2+3+5) = 2123.
For n = 18 with divisors d = 2, 3, 2*3, 3*3, 2*3*3 larger than one, A101296(d)-1 gives 1, 1, 3, 2, and 5 thus a(18) = 2^0 + 2^(0+1) + 2^(0+1+3) + 2^(0+1+3+2) + 2^(0+1+3+2+5) = 2131.
		

Crossrefs

Cf. A101296, A300250 (restricted growth sequence transform of this sequence).
Cf. also A292258, A294897.

Programs

  • PARI
    up_to = 4096;
    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]); };  \\ From A046523.
    v101296 = rgs_transform(vector(up_to, n, A046523(n)));
    A101296(n) = v101296[n];
    A297174(n) = { my(s=0,i=-1); fordiv(n, d, if(d>1, i += (A101296(d)-1); s += 2^i)); (s); };

A300716 a(1) = 0; for n > 1, a(n) = Product_{d|n, 1A101296(d)-1).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 6, 2, 4, 1, 60, 1, 4, 4, 42, 1, 60, 1, 60, 4, 4, 1, 4620, 2, 4, 6, 60, 1, 1000, 1, 546, 4, 4, 4, 21780, 1, 4, 4, 4620, 1, 1000, 1, 60, 60, 4, 1, 1021020, 2, 60, 4, 60, 1, 4620, 4, 4620, 4, 4, 1, 6897000, 1, 4, 60, 12558, 4, 1000, 1, 60, 4, 1000, 1, 75162780, 1, 4, 60, 60, 4, 1000, 1, 1021020, 42, 4, 1
Offset: 1

Views

Author

Antti Karttunen, Mar 13 2018

Keywords

Comments

a(n) = Product formed from the primes indexed with the prime signatures of proper divisors of n.
The restricted growth sequence transform of this sequence is A101296 because from the set of prime signatures of the proper divisors of n it is always possible to determine the prime signature of n itself, and vice versa, from the prime signature of n, we can form the set of prime signatures of all its proper divisors.
For all i, j: a(i) = a(j) <=> A101296(i) = A101296(j).

Examples

			For n = 12, whose proper divisors > 1 are 2, 3, 4, 6, their prime signature ranks from A101296 are: 2, 2, 3, 4. We subtract one from each, to form product prime(1)*prime(1)*prime(2)*prime(3) = 2*2*3*5 = 60, which is thus value of a(12).
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 83, s}, s = Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Times @@ MapIndexed[Prime[First@#2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1], {n, nn}]; Table[If[n == 1, 0, Times @@ Map[Prime[FirstPosition[Keys@ s, #][[1]] - 1] &, Most@ Rest@ Divisors@ n]], {n, nn}]] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    up_to = 8192;
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    v101296 = rgs_transform(vector(up_to, n, A046523(n)));
    A101296(n) = v101296[n];
    A300716(n) = { my(m=1); if(1==n, 0, fordiv(n,d,if((d>1)&(dA101296(d)-1))); (m)); };
    for(n=1,up_to,write("b300716.txt", n, " ", A300716(n)));
Showing 1-5 of 5 results.