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

A358679 Dirichlet inverse of the characteristic function of A061345, odd prime powers.

Original entry on oeis.org

1, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 2, 0, -1, 0, -1, 0, 2, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 2, 0, 2, 0, -1, 0, 2, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 2, 0, -1, 0, 2, 0, 2, 0, -1, 0, -1, 0, -1, 0, 2, 0, -1, 0, 2, 0, -1, 0, -1, 0, -1, 0, 2, 0, -1, 0, 0, 0, -1, 0, 2, 0, 2, 0, -1, 0, 2, 0, 2, 0, 2, 0, -1, 0, -1, 0, -1, 0, -1, 0, -6
Offset: 1

Views

Author

Antti Karttunen, Dec 23 2022

Keywords

Crossrefs

Programs

  • PARI
    A174275(n) = ((n%2)&&isprimepower(n));
    memoA358679 = Map();
    A358679(n) = if(1==n,1,my(v); if(mapisdefined(memoA358679,n,&v), v, v = -sumdiv(n,d,if(dA174275(n/d)*A358679(d),0)); mapput(memoA358679,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA174275(n/d) * a(d).

A237271 Number of parts in the symmetric representation of sigma(n).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 25 2014

Keywords

Comments

The diagram of the symmetry of sigma has been via A196020 --> A236104 --> A235791 --> A237591 --> A237593.
For more information see A237270.
a(n) is also the number of terraces at n-th level (starting from the top) of the stepped pyramid described in A245092. - Omar E. Pol, Apr 20 2016
a(n) is also the number of subparts in the first layer of the symmetric representation of sigma(n). For the definion of "subpart" see A279387. - Omar E. Pol, Dec 08 2016
Note that the number of subparts in the symmetric representation of sigma(n) equals A001227(n), the number of odd divisors of n. (See the second example). - Omar E. Pol, Dec 20 2016
From Hartmut F. W. Hoft, Dec 26 2016: (Start)
Using odd prime number 3, observe that the 1's in the 3^k-th row of the irregular triangle of A237048 are at index positions
3^0 < 2*3^0 < 3^1 < 2*3^1 < ... < 2*3^((k-1)/2) < 3^(k/2) < ...
the last being 2*3^((k-1)/2) when k is odd and 3^(k/2) when k is even. Since odd and even index positions alternate, each pair (3^i, 2*3^i) specifies one part in the symmetric representation with a center part present when k is even. A straightforward count establishes that the symmetric representation of 3^k, k>=0, has k+1 parts. Since this argument is valid for any odd prime, every positive integer occurs infinitely many times in the sequence. (End)
a(n) = number of runs of consecutive nonzero terms in row n of A262045. - N. J. A. Sloane, Jan 18 2021
Indices of odd terms give A071562. Indices of even terms give A071561. - Omar E. Pol, Feb 01 2021
a(n) is also the number of prisms in the three-dimensional version of the symmetric representation of k*sigma(n) where k is the height of the prisms, with k >= 1. - Omar E. Pol, Jul 01 2021
With a(1) = 0; a(n) is also the number of parts in the symmetric representation of A001065(n), the sum of aliquot parts of n. - Omar E. Pol, Aug 04 2021
The parity of this sequence is also the characteristic function of numbers that have middle divisors. - Omar E. Pol, Sep 30 2021
a(n) is also the number of polycubes in the 3D-version of the ziggurat of order n described in A347186. - Omar E. Pol, Jun 11 2024
Conjecture 1: a(n) is the number of odd divisors of n except the "e" odd divisors described in A005279. Thus a(n) is the length of the n-th row of A379288. - Omar E. Pol, Dec 21 2024
The conjecture 1 was checked up n = 10000 by Amiram Eldar. - Omar E. Pol, Dec 22 2024
The conjecture 1 is true. For a proof see A379288. - Hartmut F. W. Hoft, Jan 21 2025
From Omar E. Pol, Jul 31 2025: (Start)
Conjecture 2: a(n) is the number of 2-dense sublists of divisors of n.
We call "2-dense sublists of divisors of n" to the maximal sublists of divisors of n whose terms increase by a factor of at most 2.
In a 2-dense sublist of divisors of n the terms are in increasing order and two adjacent terms are the same two adjacent terms in the list of divisors of n.
Example: for n = 10 the list of divisors of 10 is [1, 2, 5, 10]. There are two 2-dense sublists of divisors of 10, they are [1, 2], [5, 10], so a(10) = 2.
The conjecture 2 is essentially the same as the second conjecture in the Comments of A384149. See also Peter Munn's formula in A237270.
The indices where a(n) = 1 give A174973 (2-dense numbers). See the proof there. (End)
Conjecture 3: a(n) is the number of divisors p of n such that p is greater than twice the adjacent previous divisor of n. The divisors p give the n-th row of A379288. - Omar E. Pol, Aug 02 2025

Examples

			Illustration of initial terms (n = 1..12):
---------------------------------------------------------
n   A000203  A237270    a(n)            Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|    _|_| | | | | |
5       6      3+3       2     |_ _ _|  _|  _ _|_| | | |
6      12      12        1     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|    _ _|
8      15      15        1     |_ _ _ _ _|  _|     |
9      13      5+3+5     3     |_ _ _ _ _| |      _|
10     18      9+9       2     |_ _ _ _ _ _|  _ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      28        1     |_ _ _ _ _ _ _|
...
For n = 9 the sum of divisors of 9 is 1+3+9 = A000203(9) = 13. On the other hand the 9th set of symmetric regions of the diagram is formed by three regions (or parts) with 5, 3 and 5 cells, so the total number of cells is 5+3+5 = 13, equaling the sum of divisors of 9. There are three parts: [5, 3, 5], so a(9) = 3.
From _Omar E. Pol_, Dec 21 2016: (Start)
Illustration of the diagram of subparts (n = 1..12):
---------------------------------------------------------
n   A000203  A279391  A001227           Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|  _ _|_| | | | | |
5       6      3+3       2     |_ _ _| |_|  _ _|_| | | |
6      12      11+1      2     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|  _ _ _|
8      15      15        1     |_ _ _ _ _|  _|  _| |
9      13      5+3+5     3     |_ _ _ _ _| |  _|  _|
10     18      9+9       2     |_ _ _ _ _ _| |_ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      23+5      2     |_ _ _ _ _ _ _|
...
For n = 6 the symmetric representation of sigma(6) has two subparts: [11, 1], so A000203(6) = 12 and A001227(6) = 2.
For n = 12 the symmetric representation of sigma(12) has two subparts: [23, 5], so A000203(12) = 28 and A001227(12) = 2. (End)
From _Hartmut F. W. Hoft_, Dec 26 2016: (Start)
Two examples of the general argument in the Comments section:
Rows 27 in A237048 and A249223 (4 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12
27: 1  1 1 0 0 1                           1's in A237048 for odd divisors
    1 27 3     9                           odd divisors represented
27: 1  0 1 1 1 0 0 1 1 1 0 1               blocks forming parts in A249223
Rows 81 in A237048 and A249223 (5 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12. . . 16. . . 20. . . 24
81: 1  1 1 0 0 1 0 0 1 0 0 0                          1's in A237048 f.o.d
    1 81 3    27     9                                odd div. represented
81: 1  0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1  blocks fp in A249223
(End)
		

Crossrefs

Programs

  • Mathematica
    a237271[n_] := Length[a237270[n]] (* code defined in A237270 *)
    Map[a237271, Range[90]] (* data *)
    (* Hartmut F. W. Hoft, Jun 23 2014 *)
    a[n_] := Module[{d = Partition[Divisors[n], 2, 1]}, 1 + Count[d, ?(OddQ[#[[2]]] && #[[2]] >= 2*#[[1]] &)]]; Array[a, 100] (* _Amiram Eldar,  Dec 22 2024 *)
  • PARI
    fill(vcells, hga, hgb) = {ic = 1; for (i=1, #hgb, if (hga[i] < hgb[i], for (j=hga[i], hgb[i]-1, cell = vector(4); cell[1] = i - 1; cell[2] = j; vcells[ic] = cell; ic ++;););); vcells;}
    findfree(vcells) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findxy(vcells, x, y) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[1]==x) && (vcelli[2]==y) && (vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findtodo(vcells, iz) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == iz) && (vcelli[4] == 0), return (i)); ); return (0);}
    zcount(vcells) = {nbz = 0; for (i=1, #vcells, nbz = max(nbz, vcells[i][3]);); nbz;}
    docell(vcells, ic, iz) = {x = vcells[ic][1]; y = vcells[ic][2]; if (icdo = findxy(vcells, x-1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x+1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y-1), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y+1), vcells[icdo][3] = iz); vcells[ic][4] = 1; vcells;}
    docells(vcells, ic, iz) = {vcells[ic][3] = iz; while (ic, vcells = docell(vcells, ic, iz); ic = findtodo(vcells, iz);); vcells;}
    nbzb(n, hga, hgb) = {vcells = vector(sigma(n)); vcells = fill(vcells, hga, hgb); iz = 1; while (ic = findfree(vcells), vcells = docells(vcells, ic, iz); iz++;); zcount(vcells);}
    lista(nn) = {hga = concat(heights(row237593(0), 0), 0); for (n=1, nn, hgb = heights(row237593(n), n); nbz = nbzb(n, hga, hgb); print1(nbz, ", "); hga = concat(hgb, 0););} \\ with heights() also defined in A237593; \\ Michel Marcus, Mar 28 2014
    
  • Python
    from sympy import divisors
    def a(n: int) -> int:
        divs = list(divisors(n))
        d = [divs[i:i+2] for i in range(len(divs) - 1)]
        s = sum(1 for pair in d if len(pair) == 2 and pair[1] % 2 == 1 and pair[1] >= 2 * pair[0])
        return s + 1
    print([a(n) for n in range(1, 80)])  # Peter Luschny, Aug 05 2025

Formula

a(n) = A001227(n) - A239657(n). - Omar E. Pol, Mar 23 2014
a(p^k) = k + 1, where p is an odd prime and k >= 0. - Hartmut F. W. Hoft, Dec 26 2016
Theorem: a(n) <= number of odd divisors of n (cf. A001227). The differences are in A239657. - N. J. A. Sloane, Jan 19 2021
a(n) = A340846(n) - A340833(n) + 1 (Euler's formula). - Omar E. Pol, Feb 01 2021
a(n) = A000005(n) - A243982(n). - Omar E. Pol, Aug 02 2025

A033948 Numbers that have a primitive root (the multiplicative group modulo n is cyclic).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 17, 18, 19, 22, 23, 25, 26, 27, 29, 31, 34, 37, 38, 41, 43, 46, 47, 49, 50, 53, 54, 58, 59, 61, 62, 67, 71, 73, 74, 79, 81, 82, 83, 86, 89, 94, 97, 98, 101, 103, 106, 107, 109, 113, 118, 121, 122, 125, 127, 131, 134, 137, 139
Offset: 1

Views

Author

Calculated by Jud McCranie, entered by N. J. A. Sloane

Keywords

Comments

The sequence consists of 1, 2, 4 and numbers of the form p^i and 2p^i, where p is an odd prime and i >= 1.
Sequence gives values of n such that x^2 == 1 (mod n) has no solution with 1 < x < n-1. - Benoit Cloitre, Jan 04 2002
Gaussian criterion for terms of the sequence: n is in the sequence iff Product_{1<=i<=n-1, gcd(i,n)=1} i == -1 (mod n), see example. - Vladimir Shevelev, Jan 11 2011
For the criterion used above see the Hardy and Wright reference, Theorem 129. p. 102, a consequence of Bauer's theorem. See also T. D. Noe's comment with the Nagell reference on A060594 and also A160377. - Wolfdieter Lang, Feb 16 2012
Also numbers n such that phi(n) = lambda(n) (or numbers with A034380(n)=1), where phi is A000010, and lambda is Carmichael's lambda: A002322. - Enrique Pérez Herrero, Jun 04 2013
All values of n>2 are given when there are exactly two solutions for n*j+1 is a square, 0 <= j < n, which are j = {0, n-2}. See Mathematica examples. - Richard R. Forberg, Mar 26 2016
Numbers n such that the Galois group of the cyclotomic field with the n-th roots of unity is a cyclic group. [Van der Waerden, p. 55, Th. 4.11.; Corwin, 1967] - N. J. A. Sloane, Nov 26 2016

Examples

			Gaussian product for n=9 is 1*2*4*5*7*8=2240. Since 2240==-1(mod 9), then 9 is in the sequence. - _Vladimir Shevelev_, Jan 11 2011
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, Theorem 129, p. 102.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers, 4th edition, page 62, Theorem 2.25.
  • B. L. van der Waerden, Modern Algebra, 2nd. ed., Ungar, NY, Vol. I, 1948.

Crossrefs

Cf. A033949 (complement), A072209, A001783 (Gaussian products used in the V. Shevelev example).
Union of 1, 2, 4, A061345, A278568.

Programs

  • Maple
    m := proc(n) local k, r; r := 1; if n = 2 then return false fi;
    for k from 1 to n do if igcd(n,k) = 1 then r := modp(r*k,n) fi od; r end:
    select(n -> m(n) <> 1, [$1..139]); # Peter Luschny, May 25 2017
  • Mathematica
    Join[{1}, Select[ Range[140], IntegerQ[ PrimitiveRoot[#]] &]] (* Jean-François Alcover, Sep 27 2011 *)
    Select[Range[139], EulerPhi[#] == CarmichaelLambda[#] &] (* T. D. Noe, Jun 04 2013 *)
    result = {}; Do[count = 0;
    Do[If[Mod[j^2, n] == 1, count++], {j, 2, n - 2}];
    If[count == 0, AppendTo[result, n]], {n, 1, 200}]; result (* Richard R. Forberg, Mar 26 2016 *)
    result = {}; Do[count = 0;
    Do[ r = Sqrt[n*j + 1]; If[IntegerQ[r], count++], {j, 0, n}];
    If[count == 2, AppendTo[result, n]], {n, 0, 200}]; result  (* missing{1,2} Richard R. Forberg, Mar 26 2016 *)
  • PARI
    is(n)=if(n%2, isprimepower(n) || n==1, n==2 || n==4 || (isprimepower(n/2,&n) && n>2)) \\ Charles R Greathouse IV, Apr 16 2015
    
  • Python
    from sympy import primepi, integer_nthroot
    def A033948(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x-(x>=2)-(x>=4)-sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length()))-sum(primepi(integer_nthroot(x>>1,k)[0])-1 for k in range(1,x.bit_length()-1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025

A070776 Numbers k such that number of terms in the k-th cyclotomic polynomial is equal to the largest prime factor of k.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 36, 37, 38, 40, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 56, 58, 59, 61, 62, 64, 67, 68, 71, 72, 73, 74, 76, 79, 80, 81, 82, 83, 86, 88, 89, 92, 94, 96, 97, 98, 100
Offset: 1

Views

Author

Labos Elemer, May 07 2002

Keywords

Comments

Numbers k such that A051664(k) = A006530(k).
This is also numbers in the form of 2^i*p^j, i >= 0 and j >= 0, p is an odd prime number. - Lei Zhou, Feb 18 2012
From Zhou's formulation (where the exponents i and j should actually have been specified as i > 0 OR j > 0, to exclude 1) it follows that this is a subsequence of A324109. It also follows that A005940(a(n)) = A324106(a(n)) for all n >= 1. - Antti Karttunen, Feb 15 2019
Also from Zhou's formulation, the union (disjoint) of A000079\{1} and A336101. - Peter Munn, Jul 16 2020
Numbers k>=2 such that A078701(k) = A299766(k). - Juri-Stepan Gerasimov, Jun 02 2021

Examples

			n=10: Cyclotomic[10,x]=1-x+x^2-x^3+x^4 with 5 terms [including 1] which equals largest prime factor (5) of 10=n.
		

Crossrefs

Positions of zeros in A070536.
Subsequence of A324109.
Subsequences: A000079\{1}, A336101.

Programs

  • Mathematica
    Select[Range[1000],(a=FactorInteger[#];b=Length[a];(b==1)||((b==2)&&(a[[1]][[1]]==2)))&] (* Lei Zhou, Feb 18 2012 *)
  • PARI
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1); \\ From A006530.
    A051664(n) = length(select(x->x!=0, Vec(polcyclo(n)))); \\ After program in A051664
    A070536(n) = (A051664(n) - A006530(n));
    isA070776(n) = (!A070536(n)); \\ Antti Karttunen, Feb 15 2019
    k=0; n=0; while(k<10000, n++; if(isA070776(n), k++; write("b070776.txt", k, " ", n)));

A336101 Numbers divisible by exactly one odd prime.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 34, 36, 37, 38, 40, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 56, 58, 59, 61, 62, 67, 68, 71, 72, 73, 74, 76, 79, 80, 81, 82, 83, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 103, 104
Offset: 1

Views

Author

Peter Munn, Jul 08 2020

Keywords

Comments

Numbers k for which A001221(A000265(k)) = 1. - Antti Karttunen, Jul 08 2020
Numbers whose odd part is a prime power (A246655). - Amiram Eldar, Jul 08 2020
Numbers of the form 2^r * p^q with p an odd prime (A065091), r >= 0, q >= 1. - Bernard Schott, Dec 14 2020

Crossrefs

Cf. A000265, A001221, A246655, A340373 (characteristic function).
Positions of ones in A005087.
Subsequence of A267895.
Subsequences: A007283 (3*2^n), A020714 (5*2^n), A005009 (7*2^n), A005015 (11*2^n), A005029 (13*2^n), A038550 (p*2^n, p odd prime), A065091 (odd primes), A061345 \ {1} (odd prime powers).

Programs

  • Mathematica
    Select[Range[104], PrimePowerQ[#/2^IntegerExponent[#, 2]] &] (* Amiram Eldar, Jul 08 2020 *)
  • PARI
    isA336101(n) = (1==omega(n>>valuation(n,2))); \\ Antti Karttunen, Jul 08 2020

A061346 Odd numbers that are neither primes nor prime powers.

Original entry on oeis.org

15, 21, 33, 35, 39, 45, 51, 55, 57, 63, 65, 69, 75, 77, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 123, 129, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207, 209, 213, 215, 217, 219, 221
Offset: 1

Views

Author

N. J. A. Sloane, Jun 08 2001

Keywords

Comments

Odd numbers with at least two distinct prime factors. - N. J. A. Sloane, Oct 15 2022
Odd leg of more than one primitive Pythagorean triangles. For smallest odd leg common to 2^n PPTs, see A070826. - Lekraj Beedassy, Jul 12 2006
Numbers that can be factored by Shor's algorithm. - Charles R Greathouse IV, Mar 05 2012

Crossrefs

A225375 is a subsequence.
Cf. A061345.

Programs

  • ARIBAS
    for k := 3 to 253 by 2 do ar := factorlist(k); if ar[0] < ar[length(ar)-1] then write(k," ") end; end;
    
  • Maple
    select(t -> nops(ifactors(t)[2]) > 1, [seq(2*i+1,i=1..1000)]); # Robert Israel, Dec 14 2014
  • Mathematica
    Select[Range[1, 249, 2], Length[FactorInteger[#]] > 1 &] (* Alonso del Arte, Jan 30 2012 *)
    Select[ Range[1, 475, 2], PrimeNu@# > 1 &] (* Robert G. Wilson v, Dec 12 2014 *)
  • PARI
    is(n)=ispower(n,,&n);n%2&&!isprime(n)&&n>1 \\ Charles R Greathouse IV, Jan 30 2012
    
  • PARI
    is(n)=n%2 && !isprimepower(n) && n>1 \\ Charles R Greathouse IV, May 06 2016
    
  • PARI
    count(x)=if(x<9, 0, (x\=1) - sum(k=1,logint(x,3), primepi(sqrtnint(x,k)) - 1) - x\2 - 1) \\ Charles R Greathouse IV, Mar 06 2018

Formula

a(n) ~ 2n. - Charles R Greathouse IV, Aug 20 2012

Extensions

More terms from Klaus Brockhaus, Jun 10 2001

A278568 Twice odd prime powers.

Original entry on oeis.org

2, 6, 10, 14, 18, 22, 26, 34, 38, 46, 50, 54, 58, 62, 74, 82, 86, 94, 98, 106, 118, 122, 134, 142, 146, 158, 162, 166, 178, 194, 202, 206, 214, 218, 226, 242, 250, 254, 262, 274, 278, 298, 302, 314, 326, 334, 338, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478
Offset: 1

Views

Author

N. J. A. Sloane, Nov 26 2016

Keywords

Crossrefs

Twice A061345.

Programs

  • Python
    from sympy import primepi, integer_nthroot
    def A278568(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length())))
        return bisection(f,n,n)<<1 # Chai Wah Wu, Feb 03 2025

A354940 Square array A(n, k) = A354930(n, k)/n, read by falling antidiagonals.

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 4, 7, 7, 5, 5, 9, 13, 9, 3, 7, 11, 16, 13, 6, 7, 8, 13, 19, 17, 8, 13, 4, 9, 17, 25, 21, 11, 19, 5, 3, 11, 19, 31, 25, 13, 25, 8, 9, 5, 13, 23, 37, 29, 16, 31, 11, 11, 7, 11, 16, 25, 43, 37, 23, 37, 15, 17, 10, 31, 3, 17, 27, 49, 41, 26, 43, 19, 19, 14, 41, 4, 13, 19, 29, 61, 49, 31, 49, 22, 25, 16, 51, 6, 25, 7
Offset: 1

Views

Author

Antti Karttunen, Jun 15 2022

Keywords

Comments

Array is read by descending antidiagonals with (n,k) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), etc.

Examples

			The top left 15x16 corner of the array:
n\k  |  1   2   3   4   5   6   7   8    9   10   11   12   13   14   15
-----+---------------------------------------------------------------------
   1 |  1,  2,  3,  4,  5,  7,  8,  9,  11,  13,  16,  17,  19,  23,  25,
   2 |  3,  5,  7,  9, 11, 13, 17, 19,  23,  25,  27,  29,  31,  37,  41,
   3 |  4,  7, 13, 16, 19, 25, 31, 37,  43,  49,  61,  64,  67,  73,  79,
   4 |  5,  9, 13, 17, 21, 25, 29, 37,  41,  49,  53,  57,  61,  73,  81,
   5 |  3,  6,  8, 11, 13, 16, 23, 26,  31,  36,  41,  43,  46,  51,  53,
   6 |  7, 13, 19, 25, 31, 37, 43, 49,  61,  67,  73,  79,  97, 103, 109,
   7 |  4,  5,  8, 11, 15, 19, 22, 25,  29,  32,  39,  43,  47,  50,  53,
   8 |  3,  9, 11, 17, 19, 25, 27, 33,  41,  43,  49,  57,  59,  67,  73,
   9 |  5,  7, 10, 14, 16, 19, 23, 25,  28,  32,  37,  41,  43,  46,  50,
  10 | 11, 31, 41, 51, 61, 71, 81, 91, 101, 121, 131, 141, 151, 171, 181,
  11 |  3,  4,  6,  9, 12, 15, 17, 23,  25,  28,  31,  34,  37,  45,  47,
  12 | 13, 25, 37, 49, 61, 73, 85, 97, 109, 121, 145, 157, 169, 181, 193,
  13 |  7,  8,  9, 11, 14, 20, 22, 23,  27,  33,  37,  40,  46,  47,  48,
  14 |  5, 15, 19, 29, 43, 47, 57, 61,  71,  89,  99, 103, 113, 127, 131,
  15 |  4,  8, 16, 19, 23, 31, 38, 46,  49,  53,  61,  64,  76,  79,  83,
  16 |  7, 11, 13, 17, 23, 27, 29, 33,  43,  49,  59,  61,  65,  71,  75,
		

Crossrefs

Cf. A354932 (column 1).
Rows 1 .. 7 (some of these are conjectural): A000961, A061345 (without its initial 1), A137827, A354934, A354935, A354936, A354937, A354938, A354939.

Programs

  • PARI
    up_to = 105;
    A345992(n) = for(m=1, oo, if((m*(m+1))%n==0, return(gcd(n,m))));
    memoA354930sq = Map();
    A354930sq(n, k) = { my(v=0); if(!mapisdefined(memoA354930sq,[n,k-1],&v),if(1==k, v=0, v = A354930sq(n, k-1))); for(i=1+v,oo,if(A345992(i)==n,mapput(memoA354930sq,[n,k],i); return(i))); };
    A354940sq(n, k) = (A354930sq(n, k)/n);
    A354940list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A354940sq(col,(a-(col-1))))); (v); };
    v354940 = A354940list(up_to);
    A354940(n) = v354940[n];

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).

A279186 Maximal entry in n-th row of A279185.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 2, 1, 1, 1, 2, 6, 1, 2, 4, 10, 1, 4, 2, 6, 2, 3, 1, 4, 1, 4, 1, 2, 2, 6, 6, 2, 1, 4, 2, 6, 4, 2, 10, 11, 1, 6, 4, 1, 2, 12, 6, 4, 2, 6, 3, 28, 1, 4, 4, 2, 1, 2, 4, 10, 1, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 1, 18, 4, 20, 2, 1, 6, 3, 4
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Comments

See A256608 for LCM of entries in row n.
From Robert Israel, Dec 15 2016: (Start)
If m and k are coprime then a(m*k) = lcm(a(m), a(k)).
If n is in A061345 and r = A053575(n) is in A167791, then a(n) = A000010(r). (End)

Crossrefs

Start is same as A256607 and A256608. However, all three are different.

Programs

  • Maple
    A279186 := proc(n)
        local a,k ;
        a := 1 ;
        for k from 0 to n-1 do
            a := max(a,A279185(k,n)) ;
        end do:
        a ;
    end proc : # R. J. Mathar, Dec 15 2016
  • Mathematica
    T[n_, k_] := Module[{g, y, r}, If[k == 0, Return[1]]; y = n; g = GCD[k, y]; While[g > 1, y = y/g; g = GCD[k, y]]; If[y == 1, Return[1]]; r = MultiplicativeOrder[k, y]; r = r/2^IntegerExponent[r, 2]; If[r == 1, Return[1]]; MultiplicativeOrder[2, r]];
    a[n_] := Table[T[n, k], {k, 0, n - 1}] // Max;
    Array[a, 90] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)
  • PARI
    { A279186(n) = my(r=lcm(znstar(n)[2])); znorder(Mod(2,r>>valuation(r,2))); } \\ Max Alekseyev, Feb 02 2024

Formula

a(n) = A007733(A002322(n)). - Max Alekseyev, Feb 02 2024
Showing 1-10 of 49 results. Next