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-10 of 16 results. Next

A277190 Numbers n such that A277013(n) differs from A001222(n).

Original entry on oeis.org

25, 50, 55, 65, 77, 81, 91, 95, 100, 110, 115, 117, 121, 125, 130, 133, 143, 145, 147, 154, 161, 162, 169, 171, 175, 182, 185, 189, 190, 200, 203, 205, 207, 209, 215, 220, 230, 234, 235, 242, 243, 245, 247, 250, 253, 260, 265, 266, 275, 286, 289, 290, 294, 295, 299, 301, 305, 308, 319, 322, 323, 324, 325, 329, 333, 335, 338
Offset: 1

Views

Author

Antti Karttunen, Oct 07 2016

Keywords

Comments

If the conjecture by Ulas and Ulas is true, then there are no primes in this sequence. See A186891.

Crossrefs

A277027 a(n) = A277013(n)^2.

Original entry on oeis.org

0, 1, 1, 4, 1, 4, 1, 9, 4, 4, 1, 9, 1, 4, 4, 16, 1, 9, 1, 9, 4, 4, 1, 16, 1, 4, 9, 9, 1, 9, 1, 25, 4, 4, 4, 16, 1, 4, 4, 16, 1, 9, 1, 9, 9, 4, 1, 25, 4, 4, 4, 9, 1, 16, 1, 16, 4, 4, 1, 16, 1, 4, 9, 36, 1, 9, 1, 9, 4, 9, 1, 25, 1, 4, 9, 9, 1, 9, 1, 25, 4, 4, 1, 16, 4, 4, 4, 16, 1, 16, 1, 9, 4, 4, 1, 36, 1, 9, 9, 9, 1, 9, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 07 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A277013(n)^2.

A260443 Prime factorization representation of Stern polynomials: a(0) = 1, a(1) = 2, a(2n) = A003961(a(n)), a(2n+1) = a(n)*a(n+1).

Original entry on oeis.org

1, 2, 3, 6, 5, 18, 15, 30, 7, 90, 75, 270, 35, 450, 105, 210, 11, 630, 525, 6750, 245, 20250, 2625, 9450, 77, 15750, 3675, 47250, 385, 22050, 1155, 2310, 13, 6930, 5775, 330750, 2695, 3543750, 128625, 1653750, 847, 4961250, 643125, 53156250, 18865, 24806250, 202125, 727650, 143, 1212750, 282975, 57881250, 29645, 173643750, 1414875, 18191250, 1001
Offset: 0

Views

Author

Antti Karttunen, Jul 28 2015

Keywords

Comments

The exponents in the prime factorization of term a(n) give the coefficients of the n-th Stern polynomial. See A125184 and the examples.
None of the terms have prime gaps in their factorization, i.e., all can be found in A073491.
Contains neither perfect squares nor prime powers with exponent > 1. A277701 gives the positions of the terms that are 2*square. - Antti Karttunen, Oct 27 2016
Many of the derived sequences (like A002487) have similar "Fir forest" or "Gaudian cathedrals" style scatter plot. - Antti Karttunen, Mar 21 2017

Examples

			n    a(n)   prime factorization    Stern polynomial
------------------------------------------------------------
0       1   (empty)                B_0(x) = 0
1       2   p_1                    B_1(x) = 1
2       3   p_2                    B_2(x) = x
3       6   p_2 * p_1              B_3(x) = x + 1
4       5   p_3                    B_4(x) = x^2
5      18   p_2^2 * p_1            B_5(x) = 2x + 1
6      15   p_3 * p_2              B_6(x) = x^2 + x
7      30   p_3 * p_2 * p_1        B_7(x) = x^2 + x + 1
8       7   p_4                    B_8(x) = x^3
9      90   p_3 * p_2^2 * p_1      B_9(x) = x^2 + 2x + 1
		

Crossrefs

Same sequence sorted into ascending order: A260442.
Cf. also A048675, A277333 (left inverses).
Cf. A277323, A277324 (bisections), A277200 (even terms sorted), A277197 (first differences), A277198.
Cf. A277316 (values at primes), A277318.
Cf. A023758 (positions of squarefree terms), A101082 (of terms not squarefree), A277702 (positions of records), A277703 (their values).
Cf. A283992, A283993 (number of irreducible, reducible polynomials in range 1 .. n).
Cf. also A206296 (Fibonacci polynomials similarly represented).

Programs

  • Maple
    b:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    a:= proc(n) option remember; `if`(n<2, n+1,
          `if`(irem(n, 2, 'h')=0, b(a(h)), a(h)*a(n-h)))
        end:
    seq(a(n), n=0..56);  # Alois P. Heinz, Jul 04 2024
  • 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]]; Table[a@ n, {n, 0, 56}] (* Michael De Vlieger, Apr 05 2017 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From Michel Marcus
    A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2)))); \\ After Charles R Greathouse IV's code for "ps" in A186891.
    \\ Antti Karttunen, Oct 11 2016
    
  • Python
    from sympy import factorint, prime, primepi
    from functools import reduce
    from operator import mul
    def a003961(n):
        F = factorint(n)
        return 1 if n==1 else reduce(mul, (prime(primepi(i) + 1)**F[i] for i in F))
    def a(n): return n + 1 if n<2 else a003961(a(n//2)) if n%2==0 else a((n - 1)//2)*a((n + 1)//2)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 21 2017
  • Scheme
    ;; Uses memoization-macro definec:
    (definec (A260443 n) (cond ((<= n 1) (+ 1 n)) ((even? n) (A003961 (A260443 (/ n 2)))) (else (* (A260443 (/ (- n 1) 2)) (A260443 (/ (+ n 1) 2))))))
    ;; A more standalone version added Oct 10 2016, requiring only an implementation of A000040 and the memoization-macro definec:
    (define (A260443 n) (product_primes_to_kth_powers (A260443as_coeff_list n)))
    (define (product_primes_to_kth_powers nums) (let loop ((p 1) (nums nums) (i 1)) (cond ((null? nums) p) (else (loop (* p (expt (A000040 i) (car nums))) (cdr nums) (+ 1 i))))))
    (definec (A260443as_coeff_list n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_coeff_list (/ n 2)))) (else (add_two_lists (A260443as_coeff_list (/ (- n 1) 2)) (A260443as_coeff_list (/ (+ n 1) 2))))))
    (define (add_two_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (add_two_lists nums2 nums1)) (else (map + nums1 (append nums2 (make-list (- len1 len2) 0)))))))
    

Formula

a(0) = 1, a(1) = 2, a(2n) = A003961(a(n)), a(2n+1) = a(n)*a(n+1).
Other identities. For all n >= 0:
A001221(a(n)) = A277314(n). [#nonzero coefficients in each polynomial.]
A001222(a(n)) = A002487(n). [When each polynomial is evaluated at x=1.]
A048675(a(n)) = n. [at x=2.]
A090880(a(n)) = A178590(n). [at x=3.]
A248663(a(n)) = A264977(n). [at x=2 over the field GF(2).]
A276075(a(n)) = A276081(n). ["at factorials".]
A156552(a(n)) = A277020(n). [Converted to "unary-binary" encoding.]
A051903(a(n)) = A277315(n). [Maximal coefficient.]
A277322(a(n)) = A277013(n). [Number of irreducible polynomial factors.]
A005361(a(n)) = A277325(n). [Product of nonzero coefficients.]
A072411(a(n)) = A277326(n). [And their LCM.]
A007913(a(n)) = A277330(n). [The squarefree part.]
A000005(a(n)) = A277705(n). [Number of divisors.]
A046523(a(n)) = A278243(n). [Filter-sequence.]
A284010(a(n)) = A284011(n). [True for n > 1. Another filter-sequence.]
A003415(a(n)) = A278544(n). [Arithmetic derivative.]
A056239(a(n)) = A278530(n). [Weighted sum of coefficients.]
A097249(a(n)) = A277899(n).
a(A000079(n)) = A000040(n+1).
a(A000225(n)) = A002110(n).
a(A000051(n)) = 3*A002110(n).
For n >= 1, a(A000918(n)) = A070826(n).
A007949(a(n)) is the interleaving of A000035 and A005811, probably A101979.
A061395(a(n)) = A277329(n).
Also, for all n >= 1:
A055396(a(n)) = A001511(n).
A252735(a(n)) = A061395(a(n)) - 1 = A057526(n).
a(A000040(n)) = A277316(n).
a(A186891(1+n)) = A277318(n). [Subsequence for irreducible polynomials].

Extensions

More linking formulas added by Antti Karttunen, Mar 21 2017

A186891 Numbers n such that the Stern polynomial B(n,x) is irreducible.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 89, 91, 95, 97, 101, 103, 107, 109, 113, 115, 121, 125, 127, 131, 133, 137, 139, 143, 145, 149, 151, 157, 161, 163, 167, 169, 173, 175, 179, 181, 185, 191, 193, 197, 199
Offset: 1

Views

Author

T. D. Noe, Feb 28 2011

Keywords

Comments

Ulas and Ulas conjecture that all primes are here. The nonprime n are in A186892. See A186886 for the least number having n prime factors.

Crossrefs

Cf. A057526 (degree of Stern polynomials), A125184, A260443 (Stern polynomials).
Cf. A186892 (subsequence of nonprime terms).
Cf. A186893 (subsequence for self-reciprocal polynomials).
Positions of 0 and 1's in A277013, Positions of 1 and 2's in A284011.
Cf. A283991 (characteristic function for terms > 1).

Programs

  • Mathematica
    ps[n_] := ps[n] = If[n<2, n, If[OddQ[n], ps[Quotient[n, 2]] + ps[Quotient[n, 2] + 1], x ps[Quotient[n, 2]]]];
    selQ[n_] := IrreduciblePolynomialQ[ps[n]];
    Join[{1}, Select[Range[200], selQ]] (* Jean-François Alcover, Nov 02 2018, translated from PARI *)
  • PARI
    ps(n)=if(n<2, n, if(n%2, ps(n\2)+ps(n\2+1), 'x*ps(n\2)))
    is(n)=polisirreducible(ps(n)) \\ Charles R Greathouse IV, Apr 07 2015

Formula

From Antti Karttunen, Mar 21 2017: (Start)
A283992(a(1+n)) = n.
A260443(a(1+n)) = A277318(n).
(End)

A284011 a(n) = least natural number with the same prime signature Stern polynomial B(n,x) has when it is factored over Z.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 12, 2, 6, 6, 16, 2, 12, 2, 12, 6, 6, 2, 24, 2, 6, 8, 12, 2, 30, 2, 32, 6, 6, 6, 36, 2, 6, 6, 24, 2, 30, 2, 12, 12, 6, 2, 48, 4, 6, 6, 12, 2, 24, 2, 24, 6, 6, 2, 60, 2, 6, 30, 64, 2, 30, 2, 12, 6, 30, 2, 72, 2, 6, 12, 12, 2, 30, 2, 48, 6, 6, 2, 60, 6, 6, 6, 24, 2, 60, 2, 12, 6, 6, 2, 96, 2, 12, 12, 12, 2, 30, 2, 24, 30, 6, 2, 72
Offset: 1

Views

Author

Antti Karttunen, Mar 20 2017

Keywords

Examples

			B_9(x) = x^2 + 2x + 1, which factorizes as (x + 1)^2, thus a(9) = 2^2 = 4.
		

Crossrefs

Cf. A046523, A125184, A186891 (positions of terms <= 2), A260443, A277013, A284010, A284012.
Cf. also A278233, A278243.
Differs from A046523 for the first time at n=25, where a(25) = 2, while A046523(25) = 4.

Programs

  • PARI
    \\ After Charles R Greathouse IV's code in A046523 and A186891:
    ps(n) = if(n<2, n, if(n%2, ps(n\2)+ps(n\2+1), 'x*ps(n\2)));
    A284011(n) = { my(p=0, f=vecsort(factor(ps(n))[, 2], ,4)); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }
    for(n=1, 16384, write("b284011.txt", n, " ", A284011(n)));

Formula

a(1) = 1 (by convention), and for n > 1, a(n) = A284010(A260443(n)).

A277322 a(n) = number of irreducible polynomial factors (counted with multiplicity) in the polynomial (with nonnegative integral coefficients) constructed from the prime factorization of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 09 2016

Keywords

Comments

Let p(n,x) be the completely additive polynomial-valued function such that p(prime(n),x) = x^(n-1) as defined by Clark Kimberling in A206284. Then this sequence is the number of irreducible factors in p(n,x), counted with multiplicity.

Examples

			For n = 7 = prime(4), the corresponding polynomial is x^3, which factorizes as (x)(x)(x), thus a(7) = 3.
For n = 14 = prime(4) * prime(1), the corresponding polynomial is x^3 + 1, which factorizes as (x + 1)(x^2 - x + 1), thus a(14) = 2.
For n = 90 = prime(3) * prime(2)^2 * prime(1), the corresponding polynomial is x^2 + 2x + 1, which factorizes as (x + 1)^2, thus a(90) = 2.
pfps(660) = pfps(2^2*3*5*11) = pfps(2^2) + pfps(3) + pfps(5) + pfps(11) = 2 + x + x^2 + x^4 which is irreducible, so a(660) = 1.
For n = 30030 = Product_{i=1..6} prime(i), the corresponding polynomial is x^5 + x^4 + x^3 + x^2 + x + 1, which factorizes as (x+1)(x^2 - x + 1)(x^2 + x + 1), thus a(30030) = 3.
		

Crossrefs

Cf. A206442 (gives the number of irreducible polynomial factors without multiplicity), A206284 (positions of 1's, i.e., irreducible polynomials).

Programs

  • PARI
    allocatemem(2^29);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    pfps(n) = if(1==n, 0, if(!(n%2), 1 + pfps(n/2), 'x*pfps(A064989(n))));
    A277322 = n -> if(!bitand(n,(n-1)), 0, vecsum(factor(pfps(n))[,2]));
    for(n=1, 121121, write("b277322.txt", n, " ", A277322(n)));
    
  • PARI
    pfps(n)=my(f=factor(n)); sum(i=1,#f~, f[i,2] * 'x^(primepi(f[i,1])-1))
    A277322(n) = if(1==n, 0, vecsum(factor(pfps(n))[, 2])); \\ Charles R Greathouse IV, test for one added by Antti Karttunen, Oct 09 2016

Formula

a(2^n) = 0. [By an explicit convention.]
a(A000040(n)) = n-1.
a(A007188(n)) = n.
a(A260443(n)) = A277013(n).

A283484 Odd bisection of A283983; square root of the largest square dividing A277324.

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 15, 1, 3, 15, 45, 15, 15, 15, 105, 1, 3, 105, 225, 525, 1575, 1125, 1575, 105, 105, 525, 1575, 525, 105, 105, 1155, 1, 3, 1155, 1575, 3675, 7875, 275625, 55125, 5775, 17325, 275625, 4134375, 55125, 55125, 275625, 121275, 1155, 1155, 40425, 385875, 202125, 606375, 1929375, 606375, 5775, 8085, 40425, 121275, 40425, 1155, 1155, 15015, 1, 3
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A283983((2*n)+1).
a(n) = A000188(A277324(n)).
A001222(a(n)) = A284265(n).

A283983 Square root of the largest square dividing prime factorization representation of the n-th Stern polynomial: a(n) = A000188(A260443(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 5, 3, 1, 15, 1, 1, 1, 3, 5, 15, 7, 45, 5, 15, 1, 15, 35, 15, 1, 105, 1, 1, 1, 3, 5, 105, 7, 225, 35, 525, 11, 1575, 175, 1125, 7, 1575, 35, 105, 1, 105, 35, 525, 77, 1575, 35, 525, 1, 105, 385, 105, 1, 1155, 1, 1, 1, 3, 5, 1155, 7, 1575, 385, 3675, 11, 7875, 1225, 275625, 77, 55125, 2695, 5775, 13, 17325, 13475, 275625, 539
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Crossrefs

Cf. A023758 (positions of ones).

Programs

Formula

a(n) = A000188(A260443(n)).
a(n) = A000196(A283989(n)).
Other identities. For all n >= 0:
a(2n) = A003961(a(n)).
A001222(a(n)) = A284264(n).

A284264 a(n) = A001222(A283983(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 1, 1, 2, 1, 3, 1, 2, 0, 2, 2, 2, 0, 3, 0, 0, 0, 1, 1, 3, 1, 4, 2, 4, 1, 5, 3, 5, 1, 5, 2, 3, 0, 3, 2, 4, 2, 5, 2, 4, 0, 3, 3, 3, 0, 4, 0, 0, 0, 1, 1, 4, 1, 5, 3, 5, 1, 6, 4, 8, 2, 7, 4, 5, 1, 6, 5, 8, 3, 10, 5, 7, 1, 7, 5, 8, 2, 7, 3, 4, 0, 4, 3, 6, 2, 8, 4, 7, 2, 8, 5, 9, 2, 8, 4, 5, 0, 5, 3, 6, 3, 7, 3, 6, 0
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Comments

a(n) = Sum_{c} floor(c/2), where c ranges over each coefficient of terms c * x^k in the Stern polynomial B(n,x), thus sum of the halved terms (for odd terms floored down) on row n of table A125184.

Crossrefs

Cf. A023758 (gives the positions of zeros).

Programs

Formula

a(n) = A001222(A283983(n)).
Other identities and observations. For all n >= 0:
a(2n) = a(n).
a(n) = (1/2) * (A002487(n) - A277700(n)).
2*a(n) <= A284272(n).

A284272 Sum of coefficients > 1 in the Stern polynomial B(n,x): a(n) = A275812(A260443(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 3, 0, 4, 0, 0, 0, 2, 2, 6, 2, 7, 3, 5, 0, 5, 4, 6, 0, 6, 0, 0, 0, 2, 2, 8, 2, 9, 6, 9, 2, 10, 7, 11, 3, 11, 5, 7, 0, 7, 5, 11, 4, 12, 6, 9, 0, 8, 6, 9, 0, 8, 0, 0, 0, 2, 2, 10, 2, 12, 8, 11, 2, 13, 9, 17, 6, 16, 9, 12, 2, 13, 10, 18, 7, 20, 11, 16, 3, 15, 11, 17, 5, 15, 7, 9, 0, 9, 7, 15, 5, 17, 11, 16, 4, 17, 12, 19, 6, 18, 9
Offset: 0

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Comments

Sum of terms larger than one on row n of table A125184.

Crossrefs

Cf. A002487, A125184, A260443, A275812, A284264, A284271, A284268 (odd bisection).

Programs

Formula

a(n) = A275812(A260443(n)).
Other identities and observations. For all n >= 0:
A002487(n) = A284271(n) + a(n).
a(n) >= 2*A284264(n).
Showing 1-10 of 16 results. Next