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.

Previous Showing 11-20 of 25 results. Next

A059865 Product_{i=4..n} (prime(i) - 6).

Original entry on oeis.org

1, 1, 1, 1, 5, 35, 385, 5005, 85085, 1956955, 48923875, 1516640125, 53082404375, 1964048961875, 80526007436875, 3784722349533125, 200590284525255625, 11032465648889059375, 672980404582232621875, 43743726297845120421875
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Arises in Hardy-Littlewood prime k-tuplet conjectural formulas. Also the sequence gives the exact numbers of X42424Y difference-pattern in dRRS[m], where m=modulus=A002110(n). See A049296 (=dRRS[210]=list of first differences of reduced residue system modulo 210=4th primorial). A pattern X42424Y corresponds to a residue-sextuple or it is their difference-quintuple, X,Y > 4. Analogous pattern for primes is in A022008.
a(352) has 1001 decimal digits. - Michael De Vlieger, Mar 06 2017

Examples

			a(7) = (prime(4)-6) * (prime(5)-6) * (prime(6)-6) * (prime(7)-6) = 1 * 5* 7 *11 = 385
 Also in one period of dRRS with 2,6,30,210,2310,... modulus [A002110(n)] 1,2,8,48,480,... differences occur [A005867(n)]. The number of X42424Y residue-difference-patterns are 0,1,1,1,5,... respectively starting at suitable residues coprime to A002110(n).
		

References

  • See A059862 for references.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.

Crossrefs

Programs

  • Mathematica
    Table[Product[Prime@ i - 6, {i, 4, n}], {n, 19}] (* Michael De Vlieger, Mar 06 2017 *)
  • PARI
    a(n) = prod(k=4, n, prime(k) - 6); \\ Michel Marcus, Mar 06 2017

A073266 Triangle read by rows: T(n,k) is the number of compositions of n as the sum of k integral powers of 2.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 1, 1, 3, 1, 0, 2, 3, 4, 1, 0, 2, 4, 6, 5, 1, 0, 0, 6, 8, 10, 6, 1, 1, 1, 3, 13, 15, 15, 7, 1, 0, 2, 3, 12, 25, 26, 21, 8, 1, 0, 2, 6, 10, 31, 45, 42, 28, 9, 1, 0, 0, 6, 16, 30, 66, 77, 64, 36, 10, 1, 0, 2, 4, 18, 40, 76, 126, 126, 93, 45, 11, 1, 0, 0, 6, 16, 50, 96, 168, 224, 198, 130, 55, 12, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2002

Keywords

Comments

Upper triangular region of the table A073265 read by rows. - Emeric Deutsch, Feb 04 2005
Also the convolution triangle of A209229. - Peter Luschny, Oct 07 2022

Examples

			T(6,3) = 4 because there are four ordered partitions of 6 into 3 powers of 2, namely: 4+1+1, 1+4+1, 1+1+4 and 2+2+2.
Triangle begins:
  1;
  1, 1;
  0, 2, 1;
  1, 1, 3, 1;
  0, 2, 3, 4, 1;
  0, 2, 4, 6, 5, 1;
		

Crossrefs

Cf. A048298, A073265, A023359 (row sums), A089052 (partitions of n).
T(2n,n) gives A333047.

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1,
           add(b(n-2^j)*x, j=0..ilog2(n))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Mar 06 2020
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> if n = 2^ilog2(n) then 1 else 0 fi); # Peter Luschny, Oct 07 2022
  • Mathematica
    m:= 10; T[n_, k_]:= T[n, k]= Coefficient[(Sum[x^(2^j), {j,0,m+1}])^k, x, n]; Table[T[n, k], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Mar 06 2020 *)

Formula

T(n, k) = coefficient of x^n in the formal power series (x + x^2 + x^4 + x^8 + x^16 + ...)^k. - Emeric Deutsch, Feb 04 2005
T(0, k) = T(n, 0) = 0, T(n, k) = 0 if k > n, T(n, 1) = 1 if n = 2^m, 0 otherwise and in other cases T(n, k) = Sum_{i=0..floor(log_2(n-1))} T(n-(2^i), k-1). - Emeric Deutsch, Feb 04 2005
Sum_{k=0..n} T(n,k) = A023359(n). - Philippe Deléham, Nov 04 2006

A367169 a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 0, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 1, 2, 2, 0, 3, 1, 3, 1, 0, 2, 2, 2, 4, 1, 2, 2, 1, 1, 3, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 3, 1, 3, 2, 3, 1, 2, 1, 2, 3, 3, 2, 3, 1, 5, 4, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Nov 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0));}
    
  • Python
    from sympy import factorint
    def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # Chai Wah Wu, Nov 10 2023

Formula

a(n) = A001222(A367168(n)).
Additive with a(p^e) = A048298(e).
a(n) <= A001222(n), with equality if and only if n is in A138302.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} 2^k * (P(2^k) - P(2^k+1)) = 0.28425245481079272416..., where P(s) is the prime zeta function.

A059862 a(n) = Product_{i=3..n} (prime(i) - 3).

Original entry on oeis.org

1, 1, 2, 8, 64, 640, 8960, 143360, 2867200, 74547200, 2087321600, 70968934400, 2696819507200, 107872780288000, 4746402332672000, 237320116633600000, 13289926531481600000, 770815738825932800000, 49332207284859699200000, 3354590095370459545600000, 234821306675932168192000000
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Examples

			For n = 6, a(6) = 640 because:
prime(1..6)-3 = (-1,0,2,4,8,10) -> (1,1,2,4,8,10)
and
1*1*2*4*8*10 = 640. [Example generalized and reformatted per observation of _Jon E. Schoenfield_ by _Harlan J. Brothers_, Jul 15 2018]
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, A8, A1
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<3, 1, a(n-1)*(ithprime(n)-3))
        end:
    seq(a(n), n=1..21);  # Alois P. Heinz, Nov 19 2021
  • Mathematica
    Join[{1, 1}, Table[Product[Prime[i] - 3, {i, 3, n}], {n, 3, 19}]] (* Harlan J. Brothers, Jul 02 2018 *)
    a[1] = 1; a[2] = 1; a[n_] := a[n] = a[n - 1] (Prime[n] - 3);
    Table[a[n], {n, 19}] (* Harlan J. Brothers, Jul 02 2018 *)
  • PARI
    a(n) = prod(i=3, n, prime(i) - 3); \\ Michel Marcus, Jul 15 2018

Formula

a(1) = a(2) = 1; a(n) = a(n-1) * (prime(n) - 3) for n >= 3. - David A. Corneth, Jul 15 2018

Extensions

Name clarified, offset corrected by David A. Corneth, Jul 15 2018

A367170 The number of divisors of the largest unitary divisor of n that is a term of A138302.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Nov 07 2023

Keywords

Crossrefs

Similar sequences: A365401, A365402.

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e+1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2] + 1, 1));}

Formula

Multiplicative with a(p^e) = A048298(e) + 1.
a(n) = A000005(A367168(n)).
a(n) <= A000005(n), with equality if and only if n is in A138302.

A367171 The sum of divisors of the largest unitary divisor of n that is a term of A138302.

Original entry on oeis.org

1, 3, 4, 7, 6, 12, 8, 1, 13, 18, 12, 28, 14, 24, 24, 31, 18, 39, 20, 42, 32, 36, 24, 4, 31, 42, 1, 56, 30, 72, 32, 1, 48, 54, 48, 91, 38, 60, 56, 6, 42, 96, 44, 84, 78, 72, 48, 124, 57, 93, 72, 98, 54, 3, 72, 8, 80, 90, 60, 168, 62, 96, 104, 1, 84, 144, 68, 126
Offset: 1

Views

Author

Amiram Eldar, Nov 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], (p^(e+1)-1)/(p-1), 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), (f[i, 1]^(f[i, 2]+1)-1)/(f[i, 1]-1), 1));}

Formula

Multiplicative with a(p^e) = (p^(A048298(e)+1)-1)/(p-1).
a(n) = A000203(A367168(n)).
a(n) <= A000203(n), with equality if and only if n is in A138302.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = zeta(2)/zeta(3) = 1.368432... (A306633).

A099894 XOR BINOMIAL transform of A038712.

Original entry on oeis.org

1, 2, 0, 4, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Paul D. Hanna, Oct 29 2004

Keywords

Comments

See A099884 for the definitions of the XOR BINOMIAL transform and the XOR difference triangle.
a(n) = A062383(n+1) - A062383(n). - Reinhard Zumkeller, Aug 06 2009
A038712 has offset 1, but we need to use offset 0 for the XOR BINOMIAL. - Michael Somos, Dec 30 2016

Examples

			G.f. = 1 + 2*x + 4*x^3 + 8*x^7 + 16*x^15 + 32*x^31 + 64*x^63 + 128*x^127 + ...
XOR difference triangle of A038712 begins:
[1],
[3,2],
[1,2,0],
[7,6,4,4],
[1,6,0,4,0],
[3,2,4,4,0,0],
[1,2,0,4,0,0,0],
[15,14,12,12,8,8,8,8],...
where A038712 is in the leftmost column and A099894 (this sequence) forms the main diagonal.
a(1) = 1*1 XOR 0*1 = 1, a(2) = 1*1 XOR 0*3 XOR 1*1 = 0, a(3) = 1*1 XOR 1*3 XOR 1*1 XOR 1*7 = 4 where (1, 3, 1, 7) are the first four terms of A038712. - _Michael Somos_, Dec 30 2016
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := With[ {m = n+1}, If[ m >=0 && Total[ IntegerDigits[ m, 2]] == 1, m, 0]]; (* Michael Somos, Dec 30 2016 *)
  • PARI
    {a(n)=local(B);B=0;for(i=0,n,B=bitxor(B,binomial(n,i)%2*A038712(n-i) ));B}
    
  • PARI
    {a(n) = my(m = n+1); m * ( m>=0 && hammingweight(m) == 1)}; /* Michael Somos, Dec 30 2016 */

Formula

a(2^n-1) = 2^n for n>=0 and a(k)=0 otherwise. a(n) = SumXOR_{i=0..n} (C(n, i)mod 2)*A038712(n-i) and SumXOR is summation under XOR.
a(n) = A048298(n+1). - Michael Somos, Dec 30 2016

A335062 a(n) = 1 - Sum_{d|n, d > 1} (-1)^d * a(n/d).

Original entry on oeis.org

1, 0, 2, 0, 2, -2, 2, 0, 4, -2, 2, 0, 2, -2, 6, 0, 2, -8, 2, 0, 6, -2, 2, 0, 4, -2, 8, 0, 2, -14, 2, 0, 6, -2, 6, 4, 2, -2, 6, 0, 2, -14, 2, 0, 16, -2, 2, 0, 4, -8, 6, 0, 2, -24, 6, 0, 6, -2, 2, 8, 2, -2, 16, 0, 6, -14, 2, 0, 6, -14, 2, 0, 2, -2, 16, 0, 6, -14, 2, 0, 16
Offset: 1

Views

Author

Ilya Gutkovskiy, May 21 2020

Keywords

Comments

Inverse Moebius transform of A308077.

Crossrefs

Cf. A048298, A065091 (positions of 2's), A067824, A067856, A308077, A325144, A335283.

Programs

  • Mathematica
    a[n_] := a[n] = 1 - DivisorSum[n, (-1)^# a[n/#] &, # > 1 &]; Table[a[n], {n, 1, 81}]
  • PARI
    lista(nn) = {my(va = vector(nn)); for (n=1, nn, va[n] = 1 - sumdiv(n, d, if (d>1, (-1)^d*va[n/d]));); va;} \\ Michel Marcus, May 22 2020

Formula

G.f. A(x) satisfies: A(x) = x / (1 - x) - Sum_{k>=2} (-1)^k * A(x^k).

A335063 a(n) = Sum_{k=0..n} (binomial(n,k) mod 2) * k.

Original entry on oeis.org

0, 1, 2, 6, 4, 10, 12, 28, 8, 18, 20, 44, 24, 52, 56, 120, 16, 34, 36, 76, 40, 84, 88, 184, 48, 100, 104, 216, 112, 232, 240, 496, 32, 66, 68, 140, 72, 148, 152, 312, 80, 164, 168, 344, 176, 360, 368, 752, 96, 196, 200, 408, 208, 424, 432, 880, 224, 456, 464, 944, 480
Offset: 0

Views

Author

Ilya Gutkovskiy, May 21 2020

Keywords

Comments

Modulo 2 binomial transform of nonnegative integers.

Crossrefs

Programs

  • Maple
    g:= proc(n,k) local L,M,t,j;
       L:= convert(k,base,2);
       M:= convert(n,base,2);
       1-max(zip(`*`,L,M))
    end proc:
    f:= n -> add(k*g(n-k,k),k=0..n):
    map(f, [$0..100]); # Robert Israel, May 24 2020
  • Mathematica
    Table[Sum[Mod[Binomial[n, k], 2] k, {k, 0, n}], {n, 0, 60}]
    (* or *)
    nmax = 60; CoefficientList[Series[(x/2) D[Product[(1 + 2 x^(2^k)), {k, 0, Log[2, nmax]}], x], {x, 0, nmax}], x]
  • PARI
    a(n) = n*2^(hammingweight(n)-1); \\ Michel Marcus, May 22 2020

Formula

G.f.: (x/2) * (d/dx) Product_{k>=0} (1 + 2 * x^(2^k)).
a(n) = n * 2^(A000120(n) - 1) = n * A001316(n) / 2.

A059863 a(n) = Product_{i=3..n} (prime(i)-4).

Original entry on oeis.org

1, 1, 1, 3, 21, 189, 2457, 36855, 700245, 17506125, 472665375, 15597957375, 577124422875, 22507852492125, 967837657161375, 47424045200907375, 2608322486049905625, 148674381704844620625, 9366486047405211099375, 627554565176149143658125, 43301264997154290912410625
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

References

  • See A059862 for references.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.

Crossrefs

Programs

  • PARI
    a(n) = prod(i=3, n, prime(i)-4); \\ Michel Marcus, Aug 25 2019

Extensions

More terms from Michel Marcus, Aug 25 2019
Previous Showing 11-20 of 25 results. Next