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.

A286378 Restricted growth sequence computed for Stern-polynomial related filter-sequence A278243.

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, 13, 8, 14, 5, 15, 9, 16, 2, 17, 10, 18, 6, 19, 11, 20, 4, 21, 12, 22, 7, 23, 13, 24, 3, 24, 13, 25, 8, 26, 14, 27, 5, 28, 15, 29, 9, 30, 16, 31, 2, 32, 17, 33, 10, 34, 18, 35, 6, 36, 19, 37, 11, 38, 20, 39, 4, 40, 21, 41, 12, 42, 22, 43, 7, 44, 23, 45, 13, 46, 24, 47, 3, 47, 24, 48
Offset: 0

Views

Author

Antti Karttunen, May 09 2017

Keywords

Comments

Construction: we start with a(0)=1 for A278243(0)=1, and then after, for n > 0, we use the least unused natural number k for a(n) if A278243(n) has not been encountered before, otherwise [whenever A278243(n) = A278243(m), for some m < n], we set a(n) = a(m).
When filtering sequences (by equivalence class partitioning), this sequence (with its modestly sized terms) can be used instead of A278243, because for all i, j it holds that: a(i) = a(j) <=> A278243(i) = A278243(j).
For example, for all i, j: a(i) = a(j) => A002487(i) = A002487(j).
For pairs of distinct primes p, q for which a(p) = a(q) see comments in A317945. - Antti Karttunen, Aug 12 2018

Examples

			For n=1, A278243(1) = 2, which has not been encountered before, thus we allot for a(1) the least so far unused number, which is 2, thus a(1) = 2.
For n=2, A278243(2) = 2, which was already encountered as A278243(1), thus we set a(2) = a(1) = 2.
For n=3, A278243(3) = 6, which has not been encountered before, thus we allot for a(3) the least so far unused number, which is 3, thus a(3) = 3.
For n=23, A278243(23) = 2520, which has not been encountered before, thus we allot for a(23) the least so far unused number, which is 13, thus a(23) = 3.
For n=25, A278243(25) = 2520, which was already encountered at n=23, thus we set a(25) = a(23) = 13.
		

Crossrefs

Cf. also A101296, A286603, A286605, A286610, A286619, A286621, A286622, A286626 for similarly constructed sequences.
Differs from A103391(1+n) for the first time at n=25, where a(25)=13, while A103391(26) = 14.

Programs

  • Mathematica
    a[n_] := a[n] = Which[n < 2, n + 1, EvenQ@ n, Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1] &@ a[n/2], True, a[#] a[# + 1] &[(n - 1)/2]]; With[{nn = 100}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Times @@ MapIndexed[Prime[First@#2]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater]] - Boole[# == 1] &@ a@ n, {n, 0, nn}]] (* Michael De Vlieger, May 12 2017 *)
  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,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
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2))));
    A278243(n) = A046523(A260443(n));
    v286378 = rgs_transform(vector(up_to+1,n,A278243(n-1)));
    A286378(n) = v286378[1+n];

A317945 Filter sequence constructed from the coefficients of the Stern polynomials B(d,t) collected for each divisor d of n. Restricted growth sequence transform of A317944.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Comments

Differs from A000027(n) = n (positive integers) from a(193) = 191 on.
For all i, j: a(i) = a(j) => A317838(i) = A317838(j).
There are certain prime pairs p, q for which the Stern polynomials B(p,t) and B(q,t) (see table A125184) have equal multisets of nonzero coefficients. For example, for primes 191 and 193 these coefficients are {1, 2, 2, 2, 2, 3, 1} and {1, 2, 2, 2, 3, 2, 1} (from which follows that A278243(191) = A278243(193), A286378(191) = A286378(193) and thus => a(191) = a(193) => A002487(191) = A002487(193) as well). Other such prime pairs currently known are {419, 461}, {2083, 2143} and {11777, 12799}. Whenever a(p) = a(q) for such a prime pair, then also a(2^k * p) = a(2^k * q) for all k >= 0. It would be nice to know whether there could exist any other cases of a(i) = a(j), i != j, but for example both i and j being odd semiprimes?

Crossrefs

Programs

  • PARI
    \\ Needs also code from A286378.
    up_to = 65537;
    A317944(n) = { my(m=1); fordiv(n,d, if(d>1, m *= prime(A286378(d)-1))); (m); };
    v317945 = rgs_transform(vector(up_to, n, A317944(n)));
    A317945(n) = v317945[n];

A317942 a(n) = Product_{d|n, dA286378(d)-1).

Original entry on oeis.org

1, 2, 2, 4, 2, 12, 2, 8, 6, 20, 2, 72, 2, 28, 30, 16, 2, 396, 2, 200, 42, 52, 2, 432, 10, 68, 66, 392, 2, 17100, 2, 32, 78, 92, 70, 26136, 2, 116, 102, 2000, 2, 54684, 2, 1352, 6270, 148, 2, 2592, 14, 3700, 138, 2312, 2, 178596, 130, 5488, 174, 172, 2, 9747000, 2, 188, 14322, 64, 170, 322452, 2, 4232, 222, 289100, 2, 1724976, 2
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Crossrefs

Cf. A286378, A317943 (restricted growth sequence transform), A317944.
Cf. also A293216, A305792.

Programs

  • PARI
    \\ Needs also code from A286378:
    A317942(n) = { my(m=1); fordiv(n,d,if(dA286378(d)-1))); (m); };

Formula

a(n) = Product_{d|n, dA008578(A286378(d)).
For all k >= 0, a(2^k) = 2^k.

A319693 Filter sequence combining sopfr(d) from all proper divisors d of n, where sopfr(d) is A001414(d) = sum of primes dividing d with repetition.

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, 21, 2, 22, 23, 24, 25, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 40, 41, 42, 43, 2, 44, 2, 45, 46, 47, 48, 49, 2, 50, 51, 52, 2, 53, 2, 54, 55, 56, 57, 58, 2, 59, 60, 61, 2, 62, 63, 64, 65, 66, 2, 67, 68, 69, 70, 71, 72, 73, 2, 74, 75, 76, 2, 77, 2, 78, 79, 80, 2, 73, 2, 81, 82, 83, 2, 84, 85
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Comments

Restricted growth sequence transform of A319692.
For all i, j: a(i) = a(j) => A305611(i) = A305611(j).

Examples

			The proper divisors of  96 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, while
the proper divisors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54.
It happens that sopfr(8) = sopfr(9), sopfr(16) = sopfr(18), sopfr(24) = sopfr(27), sopfr(32) = sopfr(36) and sopfr(48) = sopfr(54), and the rest of proper divisors (1, 2, 3, 4, 6, 12) are shared by both numbers, from which follows that by taking product of sopfr over proper divisors gives an identical result for both, thus a(96) = a(108). Here sopfr = A001414.
		

Crossrefs

Cf. also A319353.
Differs from A305800, A296073 and A317943 for the first time at n=108, as here a(108) = 73.

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; };
    A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
    A319692(n) = { my(m=1); fordiv(n, d, if(dA001414(d)))); (m); };
    v319693 = rgs_transform(vector(up_to,n,A319692(n)));
    A319693(n) = v319693[n];
Showing 1-4 of 4 results.