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 21-30 of 42 results. Next

A348004 Numbers whose unitary divisors have distinct values of the unitary totient function uphi (A047994).

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 72, 73, 75, 76, 77, 79, 80, 81, 83, 85, 87, 88, 89, 91
Offset: 1

Views

Author

Amiram Eldar, Sep 23 2021

Keywords

Comments

First differs from A042965 \ {0} at n=63, and from A122906 at n=53.
Since Sum_{d|k, gcd(d,k/d)=1} uphi(d) = k, these are numbers k such that the set {uphi(d) | d|k, gcd(d,k/d)=1} is a partition of k into distinct parts.
Includes all the odd prime powers (A061345), since an odd prime power p^e has 2 unitary divisors, 1 and p^e, whose uphi values are 1 and p^e - 1. It also includes all the powers of 2, except for 2 (A151821).
If k is a term, then all the unitary divisors of k are also terms.
The number of terms not exceeding 10^k for k = 1, 2, ... are 7, 74, 741, 7386, 73798, 737570, 7374534, 73740561, 737389031, 7373830133, ... Apparently, this sequence has an asymptotic density 0.73738...

Examples

			4 is a term since it has 2 unitary divisors, 1 and 4, and uphi(1) = 1 != uphi(4) = 3.
12 is a term since the uphi values of its unitary divisors, {1, 3, 4, 12}, are distinct: {1, 2, 3, 6}.
		

Crossrefs

The unitary version of A326835.

Programs

  • Mathematica
    f[p_, e_] := p^e - 1; uphi[1] = 1; uphi[n_] := Times @@ f @@@ FactorInteger[n]; q[n_] := Length @ Union[uphi /@ (d = Select[Divisors[n], CoprimeQ[#, n/#] &])] == Length[d]; Select[Range[100], q]
  • Python
    from math import prod
    from sympy.ntheory.factor_ import udivisors, factorint
    A348004_list = []
    for n in range(1,10**3):
        pset = set()
        for d in udivisors(n,generator=True):
            u = prod(p**e-1 for p, e in factorint(d).items())
            if u in pset:
                break
            pset.add(u)
        else:
            A348004_list.append(n) # Chai Wah Wu, Sep 24 2021

Formula

Numbers k such that A348001(k) = A034444(k).

A374246 Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

a(n) = 0 iff n has separable prime factors (A335433). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).

Examples

			The runs of the 4 permutations of the prime factors of 24 are:
  ((2,2,2),(3))
  ((2,2),(3),(2))
  ((2),(3),(2,2))
  ((3),(2,2,2))
The longest have length 3, so a(24) = 4 - 3 = 1.
		

Crossrefs

Using the minimum instead of maximum number of runs gives A046660.
Positions of first appearances are A151821 (powers of 2 except 2 itself).
Positions of positive terms are A335448, complement A335433.
This is an opposite version of A373957.
The sister-sequence A374247 uses A001221 instead of A001222.
This is the number of zeros at the end of row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{}, Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}],{n,100}]

Formula

a(n) = A001222(n) - A373957(n).

A374247 The greatest number of runs possible in a permutation of the prime factors of n (A373957) minus the number of distinct such factors (A001221).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

If n has separable prime factors (A335433), then a(n) = A001222(n) - A001221(n) = A046660(n). A multiset is separable iff it has an anti-run permutation (meaning there are no adjacent equal parts).

Examples

			The runs of the 6 permutations of the prime factors of 36 are:
  ((2,2),(3,3))
  ((2),(3),(2),(3))
  ((2),(3,3),(2))
  ((3),(2,2),(3))
  ((3),(2),(3),(2))
  ((3,3),(2,2))
The longest length is 4, so a(36) = 4 - 2 = 2.
		

Crossrefs

Positions of first appearances appear to be A026549.
Positions of nonzero terms are A126706, complement A303554.
This is an opposite version of A373957.
The sister-sequence A374246 uses A001222 instead of A001221.
This is the number of nonzero terms in row n of A374252.
A003242 counts run-compressed compositions, i.e., anti-runs.
A008480 counts permutations of prime factors, by number of runs A374252.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}]-PrimeNu[n],{n,100}]

Formula

a(n) = A373957(n) - A001221(n).

A383276 Numbers of the form A034444(k) * k.

Original entry on oeis.org

1, 4, 6, 8, 10, 14, 16, 18, 22, 24, 26, 32, 34, 38, 40, 46, 48, 50, 54, 56, 58, 60, 62, 64, 72, 74, 80, 82, 84, 86, 88, 94, 96, 98, 104, 106, 112, 118, 122, 128, 132, 134, 136, 140, 142, 144, 146, 152, 156, 158, 160, 162, 166, 176, 178, 180, 184, 192, 194, 200
Offset: 1

Views

Author

Amiram Eldar, Apr 21 2025

Keywords

Comments

The sorted values of {abs(A298473(n))}.
Numbers m that have a divisor d such that A034444(d) * d = m.
All the terms above 1 are even since A034444(k) is even for k >= 2.
A number m is a term if and only if either A007814(m) = A005087(m) or A007814(m) > A005087(m) + 1.

Crossrefs

The unitary analog of A036438.
Subsequences: A100484, A138929 \ {2}, A151821.
Cf. A005087, A007814, A034444, A298473, A383277 (characteristic function), A383278 (number of terms not exceeding n), A383279.

Programs

  • Mathematica
    q[k_] := AnyTrue[Divisors[k], 2^PrimeNu[#] * # == k &]; Select[Range[200], q]
    (* second program: *)
    q[k_] := Module[{e = IntegerExponent[k, 2], w}, w = PrimeNu[k/2^e]; e > w + 1 || e == w]; Select[Range[200], q]
  • PARI
    isok(k) = fordiv(k, d, if((1 << omega(d)) * d == k, return(1))); 0;
    
  • PARI
    isok(k) = {my(e = valuation(k, 2), w = omega(k >> e)); e > w + 1 || e == w;}

Formula

a(n) = A383279(n) * A034444(A383279(n)).

A385103 Number of values of s, 0 < s < n, such that -(s^s) == s (mod n).

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 17 2025

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(s&^s+s mod n=0, 1, 0), s=1..n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 20 2025
  • PARI
    a(n) = sum(s=1, n-1, -Mod(s, n)^s == s); \\ Michel Marcus, Jun 19 2025

A131127 Table read by rows: 2*A007318(n,m) - A167374(n,m).

Original entry on oeis.org

1, 3, 1, 2, 5, 1, 2, 6, 7, 1, 2, 8, 12, 9, 1, 2, 10, 20, 20, 11, 1, 2, 12, 30, 40, 30, 13, 1, 2, 14, 42, 70, 70, 42, 15, 1, 2, 16, 56, 112, 140, 112, 56, 17, 1, 2, 18, 72, 168, 252, 252, 168, 72, 19, 1, 2, 20, 90, 240, 420, 504, 420, 240, 90, 21, 1, 2, 22, 110, 330, 660, 924, 924, 660, 330, 110, 23, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 16 2007

Keywords

Comments

Row sums = A000079(n+1), n>0.
Warning: row sums are not A046055! - N. J. A. Sloane, Jul 08 2009
Row sums = A151821(n+1), n>=0. - Alois P. Heinz, Jul 13 2009
A167374 is a modified version of the pair operator A097806 with (1,1,1,...) in the main diagonal and (-1,-1,-1,...) in the subdiagonal.

Examples

			First few rows of the triangle:
  1;
  3,  1;
  2,  5,  1;
  2,  6,  7,  1;
  2,  8, 12,  9,  1;
  2, 10, 20, 20, 11,  1;
  ...
		

Crossrefs

Programs

  • Maple
    T:= (n, m)-> 2*binomial(n, m) -(-1)^(n+m)*`if`(n=m or n=m+1, 1, 0): seq(seq(T(n,m), m=0..n), n=0..12); # Alois P. Heinz, Jul 13 2009
  • Mathematica
    T[n_, m_] := 2*Binomial[n, m] - (-1)^(n+m)*If[n == m || n == m+1, 1, 0];
    Table[Table[T[n, m], {m, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 19 2016, translated from Maple *)

Extensions

Edited by N. J. A. Sloane and R. J. Mathar, Jul 09 2009
Corrected and extended by Alois P. Heinz, Jul 13 2009
Definition simplified by Georg Fischer, Jun 07 2023

A186949 a(n) = 2^n - 2*(binomial(1,n) - binomial(0,n)).

Original entry on oeis.org

1, 0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824
Offset: 0

Views

Author

Paul Barry, Mar 01 2011

Keywords

Comments

Binomial transform is A186948.
Second binomial transform is A186947.
Inverse binomial transform is (-1)^n * A168277(n).
Essentially the same as A000079, A151821, A155559, A171449, and A171559.

Programs

  • GAP
    Concatenation([1,0], List([2..30], n-> 2^n )); # G. C. Greubel, Dec 01 2019
  • Magma
    [n lt 2 select 1-n else 2^n: n in [0..30]]; // G. C. Greubel, Dec 01 2019
    
  • Maple
    seq( `if`(n<2, 1-n, 2^n), n=0..30); # G. C. Greubel, Dec 01 2019
  • Mathematica
    Table[If[n<2, 1-n, 2^n], {n, 0, 30}] (* G. C. Greubel, Dec 01 2019 *)
  • PARI
    vector(31, n, if(n<3, 2-n, 2^(n-1))) \\ G. C. Greubel, Dec 01 2019
    
  • Sage
    [1,0]+[2^n for n in (2..30)] # G. C. Greubel, Dec 01 2019
    

Formula

G.f.: (1 - 2*x + 4*x^2)/(1-2*x).
a(n) = Sum_{k=0..n} binomial(n,k)*(3^k - 2*k).
E.g.f.: exp(2*x) - 2*x. - G. C. Greubel, Dec 01 2019

A162315 Triangular array 2*P - P^-1, where P is Pascal's triangle A007318.

Original entry on oeis.org

1, 3, 1, 1, 6, 1, 3, 3, 9, 1, 1, 12, 6, 12, 1, 3, 5, 30, 10, 15, 1, 1, 18, 15, 60, 15, 18, 1, 3, 7, 63, 35, 105, 21, 21, 1, 1, 24, 28, 168, 70, 168, 28, 24, 1, 3, 9, 108, 84, 378, 126, 252, 36, 27, 1, 1, 30, 45, 360, 210, 756, 210, 360, 45, 30, 1
Offset: 0

Views

Author

Peter Bala, Jul 01 2009

Keywords

Comments

Row reversed version of A124846. For the signless version of the inverse array and its connection with sums of powers of odd integers see A162313.

Examples

			Triangle begins
=================================================
n\k|..0.....1.....2.....3.....4.....5.....6.....7
=================================================
0..|..1
1..|..3.....1
2..|..1.....6.....1
3..|..3.....3.....9.....1
4..|..1....12.....6....12.....1
5..|..3.....5....30....10....15.....1
6..|..1....18....15....60....15....18.....1
7..|..3.....7....63....35...105....21....21.....1
...
		

Crossrefs

A007318, A151821 (row sums), A080253, A124846, A162313 (unsigned matrix inverse).

Programs

  • Maple
    #A162315
    T:=(n, k)->(2-(-1)^(n-k))*binomial(n,k):
    for n from 0 to 10 do seq(T(n,k), k = 0..n) od;

Formula

TABLE ENTRIES
(1)... T(n,k) = (2 - (-1)^(n-k))*binomial(n,k).
GENERATING FUNCTION
(2)... exp(x*t)*(2*exp(t)-exp(-t)) = 1 + (3+x)*t + (1+6*x+x^2)*t^2/2!
+ ....
The e.g.f. can also be written as
(3)... exp(x*t)/G(-t), where G(t) = exp(t)/(2-exp(2*t)) is the e.g.f.
for A080253.
MISCELLANEOUS
The row polynomials form an Appell sequence of polynomials.
Row sums = A151821.

Extensions

Row sums corrected by Peter Bala, Apr 01 2010

A173078 a(n) = (5*2^n - 2*(-1)^n - 9)/3.

Original entry on oeis.org

1, 3, 11, 23, 51, 103, 211, 423, 851, 1703, 3411, 6823, 13651, 27303, 54611, 109223, 218451, 436903, 873811, 1747623, 3495251, 6990503, 13981011, 27962023, 55924051, 111848103, 223696211, 447392423, 894784851, 1789569703, 3579139411
Offset: 1

Views

Author

Paul Curtz, Feb 09 2010

Keywords

Comments

The sequence and higher-order differences in subsequent rows are
1, 3, 11, 23, 51, 103, 211, 423, 851, 1703, 3411, 6823, 13651
2, 8, 12, 28, 52, 108, 212, 428, 852, 1708, 3412, 6828, 13652
6, 4, 16, 24, 56, 104, 216, 424, 856, 1704, 3416, 6824, 13656
-2, 12, 8, 32, 48, 112, 208, 432, 848, 1712, 3408, 6832, 13648
14, -4, 24, 16, 64, 96, 224, 416, 864, 1696, 3424, 6816, 13664
-18, 28, -8, 48, 32, 128, 192, 448, 832, 1728, 3392, 6848, 1363
46, -36, 56, -16, 96, 64, 256, 384, 896, 1664, 3456, 6784, 1369
The main diagonal 1,8,16,... is essentially A000079.
A subdiagonal is 2, 4, 8, 16, ... A155559.
Other diagonals are 3, 12, 24, 48, ... = 3*A151821, 6, 12, 24, ... = A082505 and -2, -4, -8, -16, ..., a negated variant of A171449.

Programs

  • GAP
    List([1..40], n-> (5*2^n - 2*(-1)^n - 9)/3); # G. C. Greubel, Dec 01 2019
  • Magma
    [5*2^n/3-2*(-1)^n/3-3: n in [1..40]]; // Vincenzo Librandi, Aug 05 2011
    
  • Maple
    seq( (5*2^n -2*(-1)^n -9)/3, n=1..40); # G. C. Greubel, Dec 01 2019
  • Mathematica
    LinearRecurrence[{2,1,-2},{1,3,11},40] (* Harvey P. Dale, Oct 01 2018 *)
  • PARI
    vector(40, n, (5*2^n - 2*(-1)^n - 9)/3) \\ G. C. Greubel, Dec 01 2019
    
  • Sage
    [(5*2^n - 2*(-1)^n - 9)/3 for n in (1..40)] # G. C. Greubel, Dec 01 2019
    

Formula

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n+1) - 2*a(n) = A010686(n-1).
a(n) = A084214(n+1) - 3.
G.f.: x*(1 + x + 4*x^2) / ( (1-x)*(1-2*x)*(1+x) ).
a(2n+3) - a(2n+1) = 10*A000302(n).
E.g.f.: (-2*exp(-x) + 6 - 9*exp(x) + 5*exp(2*x))/3. - G. C. Greubel, Dec 01 2019

A256248 Indices of powers of two in A055744 (the sequence of n that have the same prime power set as phi(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 10, 14, 20, 29, 41, 57, 79, 110, 153, 210, 286, 392, 534, 723, 982, 1330, 1790, 2415, 3249, 4359, 5838, 7824, 10457, 13949, 18581, 24724, 32848, 43568, 57723, 76429, 101095, 133599, 176414, 232772, 306920, 404256, 532034, 699655, 919551, 1207627
Offset: 1

Views

Author

Michel Marcus, Mar 20 2015

Keywords

Comments

All powers of 2, including 1, but excluding 2 itself (A151821) are terms of A055744.
This sequence lists the positions of A151821 terms within A055744.
Is a(n+1)/a(n) ~ 4/3 for large n? - David A. Corneth, Mar 21 2015
A209229(A055744(a(n))) = 1. - Reinhard Zumkeller, Jun 01 2015

Examples

			The first terms of A055744 are 1, 4, 8, 16, 18, 32, among which 18 is the only integer that is not a power of 2. Thus this sequence starts with 1, 2, 3, 4, 6.
		

Crossrefs

Programs

  • Haskell
    a256248 n = a256248_list !! (n-1)
    a256248_list = filter ((== 1) . a209229 . a055744) [1..]
    -- Reinhard Zumkeller, Jun 01 2015
  • Mathematica
    t = Select[Range@ 1000000, First /@ FactorInteger@# == First /@ FactorInteger@ EulerPhi@ # &]; f[n_] := Block[{pf = FactorInteger@ n, p2}, p2 = First@ First@ pf; If[Length@ pf == 1 && First@ First@ pf == 2, Last@ First@ pf, 0]]; {1}~Join~Flatten@ Position[f /@ t, n_ /; n > 0] (* Michael De Vlieger, Mar 21 2015 *)
  • PARI
    lista(nn) = {nb = 0; for (n=1, nn, if (factor(n)[, 1]==factor(eulerphi(n))[, 1], nb++; if (n == 2^valuation(n, 2), print1(nb, ", "));););}
    

Extensions

a(30)-a(45) from Hiroaki Yamanouchi, Mar 31 2015
Previous Showing 21-30 of 42 results. Next