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 137 results. Next

A110969 Length of the runs of ones in A014963.

Original entry on oeis.org

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

Views

Author

Franz Vrabec, Sep 27 2005

Keywords

Comments

Unbounded sequence.
From A373669 we see that 10 first appears at a(28195574) = 10.
Also run-lengths of non-prime-powers (assuming 1 is not a prime-power), where a run of a sequence (in this case A361102) is an interval of positions at which consecutive terms differ by one. Also nonzero differences of consecutive prime-powers minus one. - Gus Wiseman, Jun 18 2024

Examples

			a(5)=2 because the fifth run of ones in A014963 is of length 2.
		

Crossrefs

Cf. A014963.
Positions of first appearances are A373670, sorted A373669.
For runs of prime-powers:
- length A174965, antiruns A373671
- min A373673, antiruns A120430
- max A373674, antiruns A006549
- sum A373675, antiruns A373576
For runs of non-prime-powers:
- length A110969 (this sequence), antiruns A373672
- min A373676, antiruns A373575
- max A373677, antiruns A255346
- sum A373678, antiruns A373679
A000961 lists all powers of primes. A246655 lists just prime-powers.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A356068 counts non-prime-powers up to n.
A361102 lists all non-prime-powers (A024619 if not including 1).
Various run-lengths: A053797, A120992, A175632, A176246.
Various antirun-lengths: A027833, A373127, A373403, A373409.

Programs

  • Mathematica
    Length /@ SplitBy[Table[Exp[MangoldtLambda[n]], {n, 400}], # != 1 &][[ ;; -1 ;; 2]] (* Michael De Vlieger, Mar 21 2024 *)
    DeleteCases[Differences[Select[Range[100],PrimePowerQ]]-1,0] (* Gus Wiseman, Jun 18 2024 *)
  • PARI
    \\ b(n) returns boolean of A014963(n) == 1.
    b(n)={my(t); !isprime(if(ispower(n, ,&t), t, n))}
    seq(n)={my(k=1, i=0, L=List()); while(#Lk, listput(L, i-k)); k = i+1)); Vec(L)} \\ Andrew Howroyd, Jan 02 2020

Extensions

Terms a(41) and beyond from Andrew Howroyd, Jan 02 2020

A174275 a(n) = 2^(n-1) mod M(n) where M(n) = A014963(n) is the exponential of the Mangoldt function.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Mats Granvik, Mar 14 2010

Keywords

Comments

Appears to be always either 0 or 1.
This follows from Fermat's Little Theorem. - Charles R Greathouse IV, Feb 13 2011
Characteristic function for odd prime powers (larger than one). - Antti Karttunen, Sep 14 2017, after Charles R Greathouse IV's Feb 13 2011 formula.

Crossrefs

Cf. A062173.

Programs

Formula

a(n) = A000079(n-1) mod A014963(n).
a(n) = 1 if n = p^k for k > 0 and p a prime not equal to 2, a(n) = 0 otherwise. - Charles R Greathouse IV, Feb 13 2011

Extensions

More terms from Antti Karttunen, Sep 14 2017
Name corrected by Steven Foster Clark, Sep 05 2023

A140256 Triangle read by columns: Column k is A014963 aerated with groups of (k-1) zeros.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 2, 2, 0, 1, 5, 0, 0, 0, 1, 1, 3, 2, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 2, 2, 0, 2, 0, 0, 0, 1, 3, 0, 3, 0, 0, 0, 0, 0, 1, 1, 5, 0, 0, 2, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 3, 0, 2, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 16 2008, Jun 11 2008

Keywords

Comments

If the row number n is prime, the row consists of T(n,1)=n followed by n-2 zeros and followed by T(n,n)=1.
Similar to A138618.
Row products of nonzero terms in row n, equals n. - Mats Granvik, May 22 2016

Examples

			First few rows of the triangle are:
   1;
   2, 1;
   3, 0, 1;
   2, 2, 0, 1;
   5, 0, 0, 0, 1;
   1, 3, 2, 0, 0, 1;
   7, 0, 0, 0, 0, 0, 1;
   2, 2, 0, 2, 0, 0, 0, 1;
   3, 0, 3, 0, 0, 0, 0, 0, 1;
   1, 5, 0, 0, 2, 0, 0, 0, 0, 1;
  11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
   1, 1, 2, 3, 0, 2, 0, 0, 0, 0, 0, 1;
  ...
Column 2 = (1, 0, 2, 0, 3, 0, 2, 0, 5, 0, 1, 0, 7, ...).
		

Crossrefs

Cf. A140255 (row sums), A014963.
Row products without the zero terms produce A000027. [Mats Granvik, Oct 08 2009]

Programs

  • Excel
    =if(row()>=column();if(mod(row();column())=0;lookup(roundup(row()/column();0);A000027;A014963);0);"")
  • Mathematica
    t[n_, k_] /; Divisible[n, k] := Exp[ MangoldtLambda[n/k] ]; t[, ] = 0; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 28 2013 *)
    (* recurrence *)
    Clear[t, s, n, k, z, nn];z = 1;nn = 14;t[n_, k_] := t[n, k] = If[k == 1, Zeta[s]*(1 - 1/n^(s - 1)) -Sum[t[n, i]/i^(s - 1), {i, 2, n}], If[Mod[n, k] == 0, t[n/k, 1], 0], 0]; A = Table[Table[Limit[t[n, k], s -> z], {k, 1, n}], {n, 1, nn}]; Flatten[Exp[A]*Table[Table[If[Mod[n, k] == 0, 1, 0], {k, 1, n}], {n, 1, nn}]] (* Mats Granvik, Apr 09 2016, May 22 2016 *)

Formula

T(n,k) = A014963(n/k) = A014963(A126988(n,k)) if k|n, T(n,k)=0 otherwise. 1 <= k <= n.
From Mats Granvik, Apr 10 2016, May 22 2016: (Start)
Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then zeta(s)*(1 - 1/n^(s - 1)) -Sum_{i=2..n} Ts(n, i)/(i)^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0.
For n not equal to k: Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then zeta(s) -Sum_{i=2..n} Ts(n, i)/i^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0.
Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then log(n) -Sum_{i=2..n} Ts(n, i)/i^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0. (End)
[The above sentences need a lot of work! Parentheses might help. - N. J. A. Sloane, Mar 14 2017]

A140579 Triangle read by rows, A014963(n) * 0^(n-k); 1<=k<=n.

Original entry on oeis.org

1, 0, 2, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 17 2008

Keywords

Comments

A140579 * [1, 2, 3,...] = A140580.
(A140579)^(-1) * [1, 2, 3,...] = A048671: (1, 1, 1, 2, 1, 6, 1, 4, 3, 10,...).
A008683 = A140579^(-1) * A140664. - Gary W. Adamson, May 20 2008

Examples

			First few rows of the triangle are:
1;
0, 2;
0, 0, 3;
0, 0, 0, 2;
0, 0, 0, 0, 5;
0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 7;
...
		

Crossrefs

Programs

  • Mathematica
    Table[If[k != n ,0,Exp[MangoldtLambda[n]]], {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, Feb 16 2019 *)
  • PARI
    {T(n,k) = if(n==1, 1, gcd(vector(n-1, k, binomial(n, k)))*0^(n-k))};
    for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    def T(n,k): return simplify(exp(add(moebius(d)*log(n/d) for d in divisors(n))))*0^(n-k)
    [[T(n,k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Feb 16 2019

Formula

Triangle read by rows, A014963(n) * 0^(n-k); 1<=k<=n.
Infinite lower triangular matrix with A014963 (1, 2, 3, 2, 5, 1, 7, 2, 3, 1, 11,...) in the main diagonal and the rest zeros.

A340675 Exponential of Mangoldt function conjugated by Tek's flip: a(n) = A225546(A014963(A225546(n))).

Original entry on oeis.org

1, 2, 2, 4, 2, 2, 2, 1, 4, 2, 2, 1, 2, 2, 2, 16, 2, 1, 2, 1, 2, 2, 2, 1, 4, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 16, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 4, 2, 2, 2, 1, 2
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Feb 01 2021

Keywords

Comments

Nonunit squarefree numbers take the value 2, other nonsquares take the value 1, and squares take the square of the value taken by their square root.

Crossrefs

Sequences used in a definition of this sequence: A014963, A048298, A225546, A267116, A297108, A340676.
Positions of 1's: {1} U A340681, 2's: A005117 \ {1}, of 4's: A062503 \ {1}, of 16's: A113849.
Positions of terms > 1: A340682, of terms > 2: A340674.
Sequences used to express relationship between terms of this sequence: A003961, A331590.

Programs

  • PARI
    A340675(n) = if(1==n,n,if(issquarefree(n), 2, if(!issquare(n), 1, A340675(sqrtint(n))^2)));

Formula

a(n) = 2^A048298(A267116(n)).
If A340673(n) = 1, then a(n) = 1, otherwise a(n) = 2^A297108(A340673(n)).
If A340676(n) = 0, then a(n) = 1, otherwise a(n) = 2^(2^(A340676(n)-1)).
If n = s^(2^k), s squarefree >= 2, k >= 0, then a(n) = 2^(2^k), otherwise a(n) = 1.
For n, k > 1, if a(n) = a(k) then a(A331590(n, k)) = a(n), otherwise a(A331590(n, k)) = 1.
a(n^2) = a(n)^2.
a(A003961(n)) = a(n).
a(A051144(n)) = 1.
a(n) = 1 if and only if A331591(n) <> 1, otherwise a(n) = 2^A051903(n).

A140255 Inverse Mobius transform of A014963.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 7, 7, 9, 12, 10, 14, 11, 10, 9, 18, 11, 20, 12, 12, 15, 24, 13, 11, 17, 10, 14, 30, 15, 32, 11, 16, 21, 14, 15, 38, 23, 18, 15, 42, 17, 44, 18, 14, 27, 48, 16, 15, 15, 22, 20, 54, 15, 18, 17, 24, 33, 60, 20, 62, 35, 16, 13, 20, 21, 68, 24, 28, 19, 72, 19, 74
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 16 2008

Keywords

Examples

			a(4) = 5 = (1, 1, 0, 1) dot (1, 2, 3, 2) = (1 + 2 + 0 + 2); where (1, 1, 0, 1) = row 4 of triangle A051731 and (1, 2, 3, 2) = the first 4 terms of A014963.
		

Crossrefs

Programs

  • PARI
    expmangoldt(n)=ispower(n, , &n); if(isprime(n), n, 1);
    a(n) = sumdiv(n, d, expmangoldt(d)) \\ Jodi Spitz, Apr 11 2023

Formula

A051731 as an infinite lower triangular matrix * A014963 as a vector.
Equals row sums of triangle A140256. - Gary W. Adamson, May 16 2008
G.f.: Sum_{k>=1} M(k)*x^k/(1 - x^k), where M(k) is the exponential of Mangoldt function (A014963). - Ilya Gutkovskiy, Jan 16 2017

Extensions

More terms from R. J. Mathar, Jan 19 2009

A072107 a(n) = Sum_{k=1..n} A014963(k).

Original entry on oeis.org

1, 3, 6, 8, 13, 14, 21, 23, 26, 27, 38, 39, 52, 53, 54, 56, 73, 74, 93, 94, 95, 96, 119, 120, 125, 126, 129, 130, 159, 160, 191, 193, 194, 195, 196, 197, 234, 235, 236, 237, 278, 279, 322, 323, 324, 325, 372, 373, 380, 381, 382, 383, 436, 437, 438, 439, 440, 441
Offset: 1

Views

Author

Benoit Cloitre, Jun 19 2002

Keywords

Comments

Is there an expression for lim_{n -> infinity} a(n)/n^2?
Equals row sums of triangle A140582. - Gary W. Adamson, May 17 2008

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Exp[MangoldtLambda[n]], {n, 1, 60}]] (* Amiram Eldar, May 05 2022 *)
  • PARI
    for(n=2,100,print1(1+sum(k=2,n,if(if(omega(k)-1,0,1)*component(component(factor(k),1),1),if(omega(k)-1,0,1)*component(component(factor(k),1),1),1)),","))

Formula

Conjecture: a(n) ~ n^2/(2*log(n)). - Vaclav Kotesovec, Jan 30 2025

A140254 Mobius transform of A014963.

Original entry on oeis.org

1, 1, 2, 0, 4, -3, 6, 0, 0, -5, 10, 0, 12, -7, -6, 0, 16, 0, 18, 0, -8, -11, 22, 0, 0, -13, 0, 0, 28, 7, 30, 0, -12, -17, -10, 0, 36, -19, -14, 0, 40, 9, 42, 0, 0, -23, 46, 0, 0, 0, -18, 0, 52, 0, -14, 0, -20, -29, 58, 0, 60, -31, 0, 0, -16, 13, 66, 0, -24, 11, 70, 0, 72, -37, 0, 0, -16
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 16 2008, Jun 29 2008

Keywords

Comments

Conjectures relating to the Mobius sequence A008683:
If mu(n) = 0, a(n) = 0.
If mu(n) = 1, (n>1), a(n) = a negative term.
If mu(n) = -1, a(n) = a positive term.
So except for the first term and zero divided by zero we would have mu(n) = -a(n)/abs(a(n)).
Examples: mu(4) = 0, a(4) = 0; mu(6) = 1, a(6) = (-3); mu(7) = (-1), a(7) = 6.

Examples

			a(5) = -3 = (1, -1, -1, 0, 0, 1) dot (1, 2, 3, 2, 5, 1) = (1 - 2 - 3 + 0 + 0 + 1), where (1, -1, -1, 0, 0, 1) = row 5 of triangle A054525 and (1, 2, 3, 2, 5, 1) = the first 5 terms of A014963.
		

Crossrefs

Formula

A054525 as an infinite lower triangular matrix * A014963 as a vector.

Extensions

More terms from Mats Granvik, Jun 29 2008

A140664 a(n) = A014963(n)*mobius(n).

Original entry on oeis.org

1, -2, -3, 0, -5, 1, -7, 0, 0, 1, -11, 0, -13, 1, 1, 0, -17, 0, -19, 0, 1, 1, -23, 0, 0, 1, 0, 0, -29, -1, -31, 0, 1, 1, 1, 0, -37, 1, 1, 0, -41, -1, -43, 0, 0, 1, -47, 0, 0, 0, 1, 0, -53, 0, 1, 0, 1, 1, -59, 0, -61, 1, 0
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 20 2008

Keywords

Comments

A008683 = A140579^(-1) * A140664 - Gary W. Adamson, May 20 2008

Crossrefs

Programs

  • Maple
    A140664 := proc(n)
            A014963(n)*numtheory[mobius](n) ;
    end proc:
    seq(A140664(n),n=1..80) ; # R. J. Mathar, Apr 05 2012
  • Mathematica
    Table[Exp[MangoldtLambda[n]]*MoebiusMu[n], {n, 1, 75}] (* G. C. Greubel, Feb 15 2019 *)
  • PARI
    {a(n) = if(n==1, 1, gcd(vector(n-1, k, binomial(n, k)))*moebius(n))};
    vector(75, n, a(n)) \\ G. C. Greubel, Feb 15 2019
    
  • Sage
    def A140664(n): return simplify(exp(add(moebius(d)*log(n/d) for d in divisors(n))))*moebius(n)
    [A140664(n) for n in (1..75)] # G. C. Greubel, Feb 15 2019

Formula

A140579 as an infinite lower triangular matrix * A008683 as a vector, where A008683 = the mu sequence and A140579 is a diagonalized matrix version of A014963. Given the A008683, the mu sequence (1, -1, -1, 0, -1, 1, -1, 0, 0, 1,...), replace (-1) with (-n). Other mu(n) remain the same.

A307742 Quasi-logarithm A064097(n) of von Mangoldt's exponential function A014963(n).

Original entry on oeis.org

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

Views

Author

I. V. Serov, Apr 26 2019

Keywords

Crossrefs

Programs

  • Mathematica
    qLog[n_] := qLog[n] = Module[{p, e}, If[n == 1, 0, Sum[{p, e} = pe; (1 + qLog[p-1])e, {pe, FactorInteger[n]}]]];
    a[n_] := qLog[Exp[MangoldtLambda[n]]];
    Array[a, 100] (* Jean-François Alcover, May 07 2019 *)
  • PARI
    mang(n) = ispower(n, , &n); if(isprime(n), n, 1); \\ A014963
    ql(n) = if (n==1, 0, if(isprime(n),1+ql(n-1), sumdiv(n,p, if(isprime(p),ql(p)*valuation(n,p))))); \\ A064097
    a(n) = ql(mang(n)); \\ Michel Marcus, Apr 26 2019

Formula

a(n) = A064097(A014963(n)).
a(n) = 1 + A064097(n-1) if n is prime.
a(n) = a(p) if n=p^k with k > 1.
a(n) = 0 if n is not a prime power or n = 1.
a(n) = -Sum_{d|n} A064097(d)*A008683(d) by Mobius inversion.
Showing 1-10 of 137 results. Next