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

A305800 Filter sequence for a(prime) = constant sequences.

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, 81, 2, 82, 83, 84, 2, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

Restricted growth sequence transform of A239968.
In the following, A stands for this sequence, A305800, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j: S(i) = S(i) => T(i) = T(j).
For example, the following implications hold:
A -> A300247 -> A305897 -> A077462 -> A101296,
A -> A290110 -> A300250 -> A101296.

Crossrefs

Differs from A296073 for the first time at n=125, as a(125) = 96, while A296073(125) = 33.
Cf. also A305900, A305801, A295300, A289626 for other "upper level" filters.

Programs

  • Mathematica
    Join[{1},Table[If[PrimeQ[n],2,1+n-PrimePi[n]],{n,2,150}]] (* Harvey P. Dale, Jul 12 2019 *)
  • PARI
    A305800(n) = if(1==n,n,if(isprime(n),2,1+n-primepi(n)));

Formula

a(1) = 1; for n > 1, a(n) = 2 for prime n, and a(n) = 1+n-A000720(n) for composite n.

A295882 Balanced ternary representation of the deficiency of n, A033879(n).

Original entry on oeis.org

1, 1, 5, 1, 4, 0, 15, 1, 17, 5, 10, 8, 12, 4, 15, 1, 52, 6, 45, 7, 10, 11, 49, 24, 46, 10, 53, 0, 28, 24, 30, 1, 45, 53, 49, 65, 36, 52, 49, 20, 40, 24, 159, 4, 12, 50, 154, 56, 161, 16, 30, 15, 142, 24, 41, 19, 43, 29, 139, 204, 150, 28, 49, 1, 154, 24, 147, 10, 159, 8, 106, 192, 99, 43, 29, 12, 139, 24, 87, 55
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Crossrefs

Cf. A000396 (gives the positions of zeros).

Programs

Formula

If A033879(n) >= 0, then a(n) = A117967(A033879(n)), otherwise a(n) = A117968(-A033879(n)).
For all n >= 1, A117966(a(n)) = A033879(n).

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

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, 81, 2, 82, 83, 84, 2, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 86
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2018

Keywords

Comments

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

Examples

			Proper divisors of 115 are 1, 5 and 23 and proper divisors of 125 are 1, 5 and 25. The divisors 1 and 5 occur in both, while for the Stern polynomials B(23,t) and B(25,t) (see A125184) the nonzero coefficients are {1, 2, 3, 1} and {1, 3, 2, 1}, that is, they are equal as multisets, thus A286378(23) = A286378(25). From this follows that a(115) = a(125).
		

Crossrefs

Cf. also A293217, A305793.
Differs from A305800 and A296073 for the first time at n=125, where a(125) = 86.

Programs

  • PARI
    \\ Needs also code from A286378:
    up_to = 65537;
    A317942(n) = { my(m=1); fordiv(n,d,if(dA286378(d)-1))); (m); };
    v317943 = rgs_transform(vector(up_to, n, A317942(n)));
    A317943(n) = v317943[n];

A296071 a(n) = Product_{d|n, dA019565(A289813(A295882(d))); a product obtained from the 1's present in balanced ternary representation of the deficiencies of the proper divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 12, 2, 8, 6, 24, 2, 24, 2, 20, 36, 16, 2, 60, 2, 144, 30, 40, 2, 48, 12, 60, 30, 240, 2, 1080, 2, 32, 60, 56, 60, 120, 2, 28, 90, 576, 2, 3600, 2, 400, 900, 168, 2, 96, 10, 1008, 84, 1200, 2, 420, 120, 480, 42, 56, 2, 4320, 2, 84, 1500, 64, 180, 4200, 2, 784, 252, 90720, 2, 1200, 2, 140, 2520, 784, 100, 75600, 2, 1152, 210, 840, 2
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Comments

Used as a part of filter A296073.

Crossrefs

Programs

  • PARI
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A117967(n) = if(n<=1,n,if(!(n%3),3*A117967(n/3),if(1==(n%3),1+3*A117967((n-1)/3),2+3*A117967((n+1)/3))));
    A117968(n) = if(1==n,2,if(!(n%3),3*A117968(n/3),if(1==(n%3),2+3*A117968((n-1)/3),1+3*A117968((n+1)/3))));
    A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From Rémy Sigrist
    A295882(n) = { my(x = (2*n)-sigma(n)); if(x >= 0,A117967(x),A117968(-x)); };
    A296071(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289813(A295882(d))))); m; };
    
  • Scheme
    (define (A296071 n) (let loop ((m 1) (props (proper-divisors n))) (cond ((null? props) m) (else (loop (* m (A019565 (A289813 (A295882 (car props))))) (cdr props))))))
    (define (proper-divisors n) (reverse (cdr (reverse (divisors n)))))
    (define (divisors n) (let loop ((k n) (divs (list))) (cond ((zero? k) divs) ((zero? (modulo n k)) (loop (- k 1) (cons k divs))) (else (loop (- k 1) divs)))))

Formula

a(n) = Product_{d|n, dA019565(A289813(A295882(d))).

A296072 a(n) = Product_{d|n, dA019565(A289814(A295882(d))); a product obtained from the -1's present in balanced ternary representation of the deficiencies of the proper divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 12, 1, 2, 6, 1, 1, 12, 1, 1, 12, 3, 1, 12, 1, 1, 2, 15, 3, 216, 1, 5, 2, 6, 1, 6, 1, 2, 36, 5, 1, 180, 3, 10, 30, 1, 1, 1080, 1, 3, 10, 1, 1, 3240, 1, 1, 36, 1, 1, 20, 1, 450, 10, 30, 1, 45360, 1, 1, 30, 75, 3, 10, 1, 60, 360, 1, 1, 540, 15, 105, 2, 2, 1, 3240, 3, 50, 2, 35, 5, 2520, 1, 630, 60, 90, 1, 900
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Comments

Used as a part of filter A296073.

Crossrefs

Programs

  • PARI
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A117967(n) = if(n<=1,n,if(!(n%3),3*A117967(n/3),if(1==(n%3),1+3*A117967((n-1)/3),2+3*A117967((n+1)/3))));
    A117968(n) = if(1==n,2,if(!(n%3),3*A117968(n/3),if(1==(n%3),2+3*A117968((n-1)/3),1+3*A117968((n+1)/3))));
    A289814(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From Rémy Sigrist
    A295882(n) = { my(x = (2*n)-sigma(n)); if(x >= 0,A117967(x),A117968(-x)); };
    A296072(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289814(A295882(d))))); m; };
    
  • Scheme
    (define (A296072 n) (let loop ((m 1) (props (proper-divisors n))) (cond ((null? props) m) (else (loop (* m (A019565 (A289814 (A295882 (car props))))) (cdr props))))))
    (define (proper-divisors n) (reverse (cdr (reverse (divisors n)))))
    (define (divisors n) (let loop ((k n) (divs (list))) (cond ((zero? k) divs) ((zero? (modulo n k)) (loop (- k 1) (cons k divs))) (else (loop (- k 1) divs)))))

Formula

a(n) = Product_{d|n, dA019565(A289814(A295882(d))).

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