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 10 results.

A061345 Powers of odd primes. Alternatively, 1 and the odd prime powers (p^k, p an odd prime, k >= 1).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 0

Views

Author

N. J. A. Sloane, Jun 08 2001

Keywords

Comments

Let a(n)=p^e, then tau(a(n)^2) = tau(p^(2*e)) = 2*e+1 = 2*(e+1)-1 = tau(2*a(n))-1 where tau=A000005. - Juri-Stepan Gerasimov, Jul 14 2011
For n > 0, also the allowed indices of a Cossidente-Penttila graph. - Eric W. Weisstein, Feb 24 2025

Crossrefs

Programs

  • Magma
    [1] cat [n: n in [3..300 by 2] | IsPrimePower(n)]; // Bruno Berselli, Feb 25 2016
    
  • Maple
    select(t -> nops(ifactors(t)[2])<=1, [seq(2*i+1,i=0..1000)]); # Robert Israel, Jun 11 2014
    # alternative:
    A061345 := proc(n)
        option remember;
        local k ;
        if n = 0 then
            1;
        else
            for k from procname(n-1)+2 by 2 do
                if nops(numtheory[factorset](k)) = 1 then
                    return k ;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jun 25 2016
    isOddPrimepower := n -> type(n, 'primepower') and not type(n, 'even'):
    A061345List := up_to -> select(isOddPrimepower, [`$`(1..up_to)]):
    A061345List(240); # Peter Luschny, Feb 02 2023
  • Mathematica
    t={1};k=0;Do[If[k==1,AppendTo[t,a1]];k=0;Do[c=Sqrt[a^2+b^2];If[IntegerQ[c]&&GCD[a,b,c]==1,k++;a1=a;b1=b;c1=c;],{b,4,a^2/2,2}],{a,3,260,2}];t (* Vladimir Joseph Stephan Orlovsky, Jan 29 2012 *)
    Select[2 Range@ 130 - 1, PrimeNu@# < 2 &] (* Robert G. Wilson v, Jun 12 2014 *)
    Join[{1}, Select[Range[1, 200, 2], PrimePowerQ]] (* Eric W. Weisstein, Feb 23 2025 *)
  • PARI
    is(n)=my(p); if(isprimepower(n,&p), p>2, n==1) \\ Charles R Greathouse IV, Jun 08 2016
    
  • Python
    from sympy import primepi, integer_nthroot
    def A061345(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-sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length())))
        return bisection(f,n+1,n+1) # Chai Wah Wu, Feb 03 2025

Formula

a(n) = A061344(n)-1.
Intersection of A000961 (prime powers) and A005408 (odd numbers). - Robert Israel, Jun 11 2014

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001

A024556 Odd squarefree composite numbers.

Original entry on oeis.org

15, 21, 33, 35, 39, 51, 55, 57, 65, 69, 77, 85, 87, 91, 93, 95, 105, 111, 115, 119, 123, 129, 133, 141, 143, 145, 155, 159, 161, 165, 177, 183, 185, 187, 195, 201, 203, 205, 209, 213, 215, 217, 219, 221, 231, 235, 237, 247, 249, 253, 255, 259, 265, 267, 273
Offset: 1

Views

Author

N. J. A. Sloane, May 22 2000

Keywords

Comments

Composite numbers n such that Sum_{k=1..n-1} floor(k^3/n) = (1/4)*(n-2)*(n^2-1) (equality also holds for all primes). - Benoit Cloitre, Dec 08 2002

Crossrefs

Intersection of A056911 and A071904.
Subsequence of A061346.

Programs

  • Haskell
    a024556 n = a024556_list !! (n-1)
    a024556_list = filter ((== 0) . a010051) $ tail a056911_list
    -- Reinhard Zumkeller, Apr 12 2012
    
  • Mathematica
    Complement[Select[Range[3,281,2],SquareFreeQ],Prime[Range[PrimePi[281]]]] (* Harvey P. Dale, Jan 26 2011 *)
  • PARI
    is(n)=n>1&&n%2&&!isprime(n)&&issquarefree(n) \\ Charles R Greathouse IV, Apr 12 2012
    
  • PARI
    forstep(n=3,273,2,k=omega(n);if(k>1&&bigomega(n)==k,print1(n,", "))) \\ Hugo Pfoertner, Dec 19 2018

Formula

a(n) = (Pi^2/4)*n + O(n/log n). - Charles R Greathouse IV, Mar 12 2025

Extensions

More terms from James Sellers, May 22 2000

A072995 Least k > 0 such that the number of solutions to x^k == 1 (mod k) 1 <= x <= k is equal to n, or 0 if no such k exists.

Original entry on oeis.org

1, 4, 9, 8, 25, 18, 49, 16, 27, 50, 121, 36, 169, 98, 225, 32, 289, 54, 361, 110, 147, 242, 529, 72, 125, 338, 81, 196, 841, 0, 961, 64, 1089, 578, 1225, 108, 1369, 722, 507, 100, 1681, 0, 1849, 484, 675, 1058, 2209, 144, 343, 250, 2601, 1378, 2809
Offset: 1

Views

Author

Benoit Cloitre, Aug 21 2002

Keywords

Comments

A072989 lists the indices for which a(n) differs from A050399(n), e.g., in n = 20, 40, 52, ... in addition to the zeros in this sequence (n = 30, 42, 66, 70, 78, 90, ...). See also A009195 vs. A072994. [Corrected and extended by M. F. Hasler, Feb 23 2014]
The sequence seems difficult to extend, as the next term a(30) is larger than 5100. However, a(32)=64, a(64)=128 and a(128)=256 can be easily calculated. It thus appears that a(2^k)=2^(k+1), for k=1,2,3,.... Is this known to be true? - John W. Layman, Aug 05 2003 -- Answer: It's true. One could have defined the sequence so that a(1)=2: then it would be true for 2^0 also. - Don Reble, Feb 23 2014
a(30), if it exists, is greater than 400000. - Ryan Propper, Sep 10 2005
a(30) doesn't exist: If N is even, and divisible by D different odd primes, but not divisible by 2^D, then a(N) doesn't exist. - Don Reble, Feb 23 2014 [This and the preceding comment refer to the former definition lacking the clause "0 if no such k exists". - Ed.]
Conjecture: a(n)=0 iff n/2 is in A061346. - Robert G. Wilson v, Feb 23 2014
[n=420 seems to be a counterexample to the above conjecture. - M. F. Hasler, Feb 24 2014]
From Robert G. Wilson v, Mar 05 2014: (Start)
Observation:
If n = 1 then a(n) = 1 by definition;
If, but not iff, n (an even number) is a member of A238367 then a(n) = 0;
If n (an even number not in A238367) is {684, 954, ...}, then a(n) = 0;
If n (an odd number) is {273, 399, 651, 741, 777, 903, ...}, then a(n) = 0;
If p is a prime [A000040] and e is its exponent, then a(p^e) = p^(e+1);
If p is a prime then a(2p^e) = 2p^(e+1);
If p is a prime then a(n) # p since the f(p)=1.
(End)
Often A072995(n) equals A050399(n). They differ at n: 20, 30, 40, 42, 52, 60, 66, 68, 70, 78, 80, 84, 90, 100, 102, 104, 110, 114, 116, 120, 126, 130, 132, ... - Robert G. Wilson v, Dec 06 2014
When A072995(n)>0 and does not equal A050399(n): 20, 40, 52, 60, 68, 80, 84, 100, 104, 116, 120, 132, 136, 140, 148, 156, 160, 164, 168, 171, 180, 200, ... - Robert G. Wilson v, Dec 06 2014
When a(n) > 1, then 2n <= a(n) <= n^2. - Robert G. Wilson v, Dec 10 2014

Crossrefs

Cf. A072994.

Programs

  • Mathematica
    t = Table[0, {1000}]; f[n_] := (d = If[EvenQ@ n, 2, 1]; d*Length@ Select[ Range[ n/d], PowerMod[#, n, n] == 1 &]); f[1] = 1; k = 1; While[k < 520001, If[ PrimeQ@ k, k++]; a = f@ k; If[a < 1001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++]; t (* Robert G. Wilson v, Dec 12 2014 *)
  • PARI
    A072995(n)=(n%2||n%2^(omega(n)-1)==0)&&for(k=1,9e9,A072994(k)==n&&return(k)) \\ M. F. Hasler, Feb 23 2014

Formula

First occurrence of n in A072994.

Extensions

More terms from Don Reble, Feb 23 2014
Edited, at the suggestion of Don Reble, by M. F. Hasler, Feb 23 2014

A244623 Odd prime powers that are not primes.

Original entry on oeis.org

1, 9, 25, 27, 49, 81, 121, 125, 169, 243, 289, 343, 361, 529, 625, 729, 841, 961, 1331, 1369, 1681, 1849, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 14641, 15625, 16129, 16807, 17161, 18769, 19321, 19683
Offset: 1

Views

Author

Jani Melik, Jul 02 2014

Keywords

Comments

Intersection of A061345 and A014076.
A014076 set minus A061346.

Crossrefs

Intersection of A005408 and A025475.
Cf. A061345 (odd prime powers), A061346 (odd neither prime nor prime power), A062739 (odd powerful), A075109 (perfect powers), A136141.

Programs

  • Mathematica
    Join[{1},Select[Range[1,20001,2],PrimePowerQ[#]&&(!PrimeQ[#])&]] (* Harvey P. Dale, Dec 11 2018 *)
  • PARI
    isok(p) = ((p%2) && !isprime(p) && isprimepower(p)) || (p==1); \\ Michel Marcus, Jul 06 2021
  • Sage
    def isA244623(n) :
       return(n % 2 == 1 and is_prime_power(n) == 1 and is_prime(n) == 0)
    [n for n in (1..20000) if isA244623(n)]
    

Formula

a(n) = A079290(n) at least in the range n=3..94, and perhaps beyond. - R. J. Mathar, Aug 20 2014
Sum_{n>=1} 1/a(n) = 1/2 + Sum_{p prime} 1/(p*(p-1)) = 1/2 + A136141. - Amiram Eldar, Dec 21 2020

A120890 Ordered odd leg of primitive Pythagorean triangles.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 15, 15, 17, 19, 21, 21, 23, 25, 27, 29, 31, 33, 33, 35, 35, 37, 39, 39, 41, 43, 45, 45, 47, 49, 51, 51, 53, 55, 55, 57, 57, 59, 61, 63, 63, 65, 65, 67, 69, 69, 71, 73, 75, 75, 77, 77, 79, 81, 83, 85, 85, 87, 87, 89, 91, 91, 93, 93, 95, 95, 97, 99, 99, 101, 103
Offset: 1

Views

Author

Lekraj Beedassy, Jul 12 2006

Keywords

Comments

Ordered union of A081874 and A081934.
Conjecture: lim_{n->oo} a(n)/n = 1/Pi. Limit is also conjectured to be equal to lim_{n->oo} A120427(n)/n, see Selle reference, chapter 2.3.10. - Lothar Selle, Jun 21 2022

References

  • Lothar Selle, Kleines Handbuch Pythagoreische Zahlentripel, Books on Demand, 4th impression 2022, chapter 2.2.1., see chapter 2.3.10 for identity of lim_{n->oo} A120427(n)/n.

Crossrefs

Extensions

Corrected by T. D. Noe, Oct 25 2006

A257591 Odd numbers which are not prime powers but which have a proper divisor == 1 mod 4.

Original entry on oeis.org

15, 35, 39, 45, 51, 55, 63, 65, 75, 85, 87, 91, 95, 99, 105, 111, 115, 117, 119, 123, 135, 143, 145, 147, 153, 155, 159, 165, 171, 175, 183, 185, 187, 189, 195, 203, 205, 207, 215, 219, 221, 225, 231, 235, 245, 247, 255, 259, 261, 265, 267, 273, 275, 279, 285
Offset: 1

Views

Author

N. J. A. Sloane, May 14 2015

Keywords

Examples

			63 = 7*9 is not a power of a prime and has a proper divisor 9 == 1 mod 4.
		

Crossrefs

Subsequence of A061346.

Programs

  • PARI
    lista(nn) = {forstep(n=1, nn, 2, if (!isprimepower(n) && sumdiv(n, d, (d != 1) && (d != n) && ((d % 4)==1)), print1(n, ", ")););} \\ Michel Marcus, Jun 19 2015

Extensions

a(7)=57 removed and a(11)-a(55) added by Hiroaki Yamanouchi, May 20 2015

A083390 m such that 2m + 1 divides lcm(1,3,5,...,2m - 1).

Original entry on oeis.org

7, 10, 16, 17, 19, 22, 25, 27, 28, 31, 32, 34, 37, 38, 42, 43, 45, 46, 47, 49, 52, 55, 57, 58, 59, 61, 64, 66, 67, 70, 71, 72, 73, 76, 77, 79, 80, 82, 85, 87, 88, 91, 92, 93, 94, 97, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 112, 115, 117, 118, 122, 123, 124, 126
Offset: 1

Views

Author

Lekraj Beedassy, Jun 11 2003

Keywords

Comments

Also m for which A025547(m)=A025547(m+1). Query: a(n) seems to be equal to A030343(n+4) - 1. Is this true?
While any odd number>1 can be the leg of a primitive Pythagorean triangle, the m-th odd number 2m+1=A061346 forms leg common to more than one PPT. - Lekraj Beedassy, Jul 12 2006

Examples

			10 is in the sequence because we have 2*10 - 1 = 19 and lcm(1,3,5,...,19)=166966608033225=7950790858725*21 which is divisible by 2*10 + 1 = 21.
		

Crossrefs

Cf. A080765.

Programs

  • Mathematica
    Select[Range[150],Divisible[LCM@@Range[1,2#-1,2],2#+1]&] (* Harvey P. Dale, Jan 22 2023 *)
  • PARI
    isok(n) = {lc = 1; for (i = 1, 2*n-1, lc = lcm(lc, i);); return (lc % (2*n+1) == 0);} \\ Michel Marcus, Jul 27 2013

Formula

a(n) = (A061346(n)-1)/2. - David Wasserman, Oct 26 2004

Extensions

More terms from David Wasserman, Oct 26 2004

A120114 a(n) = lcm(1, ..., 2n+4)/lcm(1, ..., 2n+2).

Original entry on oeis.org

6, 5, 14, 3, 11, 13, 2, 17, 19, 1, 23, 5, 3, 29, 62, 1, 1, 37, 1, 41, 43, 1, 47, 7, 1, 53, 1, 1, 59, 61, 2, 1, 67, 1, 71, 73, 1, 1, 79, 3, 83, 1, 1, 89, 1, 1, 1, 97, 1, 101, 103, 1, 107, 109, 1, 113, 1, 1, 1, 11, 1, 5, 254, 1, 131, 1, 1, 137, 139, 1, 1, 1, 1
Offset: 0

Views

Author

Paul Barry, Jun 09 2006

Keywords

Comments

The subdiagonal of A120113 is -a(n).
From Robert Israel, Dec 03 2024: (Start)
a(n) is the product of the primes p such that 2*n + 3 or 2*n + 4 is a power of p.
Thus: a(n) = 1 if and only if neither 2*n + 3 nor 2*n + 4 is in A000961.
if n + 1 = 2^k - 1 is a Mersenne number but not a Mersenne prime, then a(n) = 2;
if n + 1 = 2^k - 1 is a Mersenne prime, then a(n) = 2 * (2^k - 1);
otherwise a(n) is odd. (End)
Conjectures from Davide Rotondo, Dec 02 2024: (Start)
Except for 2, if a(n) is even then a(n)/2 is a Mersenne prime.
If a(n)=1 or a(n)=2 then (n*2)+3 is in A061346, or also, or (n+1) is in A083390. (End)

Crossrefs

Programs

  • GAP
    List([0..75],n->Lcm(List([1..2*n+4],i->i))/Lcm(List([1..2*n+2],i->i))); # Muniru A Asiru, Mar 04 2019
    
  • Magma
    A120114:= func< n | Lcm([1..2*n+4])/Lcm([1..2*n+2]) >;
    [A120114(n): n in [0..100]]; // G. C. Greubel, May 05 2023
    
  • Maple
    f:= proc(n) local t,x,S;
       t:= 1;
       for x from 2*n+3 to 2*n+4 do
         S:= numtheory:-factorset(x);
         if nops(S) = 1 then t:= t*S[1] fi;
       od;
       t
    end proc:
    map(f, [$0..100]); # Robert Israel, Dec 03 2024
  • Mathematica
    Table[(LCM@@Range[2n+4])/LCM@@Range[2n+2],{n,0,100}] (* Harvey P. Dale, Dec 15 2017 *)
  • SageMath
    def A120114(n):
        return lcm(range(1,2*n+5)) // lcm(range(1,2*n+3))
    [A120114(n) for n in range(101)] # G. C. Greubel, May 05 2023

Formula

a(n) = A099996(n+2)/A099996(n+1). - Michel Marcus, May 06 2023

Extensions

More terms from Harvey P. Dale, Dec 15 2017

A238367 Even numbers n such that n is not divisible by 2^d where d is the number of distinct odd prime factors of n.

Original entry on oeis.org

30, 42, 66, 70, 78, 90, 102, 110, 114, 126, 130, 138, 150, 154, 170, 174, 182, 186, 190, 198, 210, 222, 230, 234, 238, 246, 258, 266, 270, 282, 286, 290, 294, 306, 310, 318, 322, 330, 342, 350, 354, 366, 370, 374, 378, 390, 402, 406, 410, 414, 418, 420, 426, 430, 434, 438, 442, 450, 462, 470, 474, 490, 494, 498
Offset: 1

Views

Author

Robert G. Wilson v, Feb 25 2014

Keywords

Comments

Inspired by comment by Don Reble in A072995.
2*A061346 = A238367 with the exceptions of 420, 660, 780, 924, 1020, 1092, 1140, 1260, ... .

Examples

			30 is in the sequence because the odd primes that divide 30 are 3 and 5, but 2^2 does not divide 30.
		

Crossrefs

Cf. A072995.

Programs

  • Mathematica
    Select[2 Range[250], Mod[#, 2^(PrimeNu[#] - 1)] != 0 &]

A321644 Squarefree odd composite numbers whose factors are all twin primes (not necessarily from the same pair).

Original entry on oeis.org

15, 21, 33, 35, 39, 51, 55, 57, 65, 77, 85, 87, 91, 93, 95, 105, 119, 123, 129, 133, 143, 145, 155, 165, 177, 183, 187, 195, 203, 205, 209, 213, 215, 217, 219, 221, 231, 247, 255, 273, 285, 287, 295, 301, 303, 305, 309, 319, 321, 323, 327, 341, 355, 357, 365
Offset: 1

Views

Author

Dimitris Valianatos, Nov 15 2018

Keywords

Comments

This sequence has infinitely many terms if and only if the twin prime conjecture is true.

Examples

			a(3) = 33 = 3 * 11; 3 and 11 are both twin primes, but not from the same pair.
		

Crossrefs

Subsequence of A024556, and hence of A056911, A061346, and A071904.
Cf. A001097.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    P:= select(isprime, {seq(i,i=3..(N+6)/3,2)}):
    TP:= P intersect map(`-`,P,2):
    TP:= TP union map(`+`,TP,2):
    Agenda:= map(t -> [t],TP): Res:= NULL:
    while Agenda <> {} do
       Agenda:= map(proc(t) local s; seq([op(t),s], s = select(s -> s > t[-1] and s*convert(t,`*`) <= N , TP)) end proc, Agenda);
       Res:= Res, op(map(convert,Agenda,`*`));
    od:
    sort([Res]); # Robert Israel, Jan 27 2019
  • Mathematica
    seqQ[n_] := CompositeQ[n] && SquareFreeQ[n] && Module[{f = FactorInteger[n][[;;, 1]]}, Length[Select[f, PrimeQ[# - 2] || PrimeQ[# + 2] &]] == Length[f]]; Select[ Range[1, 365, 2], seqQ] (* Amiram Eldar, Nov 15 2018 *)
  • PARI
    {forcomposite(n=3, 1000, if(moebius(n) <> 0, v = factor(n)~; i = 0;for(k = 1, #v,p=v[1,k]; if(isprime(p-2)||isprime(p+2), i++));if(i==#v,print1(n", "))))}
Showing 1-10 of 10 results.