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

A141766 A positive integer n is included if both (p-1) and (p+1) divide n for every prime p that divides n.

Original entry on oeis.org

1, 12, 24, 36, 48, 60, 72, 96, 108, 120, 144, 168, 180, 192, 216, 240, 288, 300, 324, 336, 360, 384, 432, 480, 504, 540, 576, 600, 648, 660, 672, 720, 768, 840, 864, 900, 960, 972, 1008, 1080, 1152, 1176, 1200, 1296, 1320, 1344, 1440, 1500, 1512, 1536, 1620
Offset: 1

Views

Author

Leroy Quet, Jul 02 2008

Keywords

Comments

Every term is a multiple of 12.

Examples

			120 has the prime factorization of 2^3 * 3^1 * 5^1. The distinct primes dividing 120 are therefore 2,3,5. 2-1=1, 3-1=2 and 5-1=4 all divide 120. Also, 2+1=3, 3+1=4 and 5+1=6 all divide 120. So 120 is included in the sequence.
		

Crossrefs

Programs

  • Haskell
    a141766 n = a141766_list !! (n-1)
    a141766_list = filter f [1..] where
       f x = all (== 0) $ map (mod x) $ (map pred ps) ++ (map succ ps)
             where ps = a027748_row x
    -- Reinhard Zumkeller, Aug 27 2013
  • Mathematica
    Select[Range[2, 1620], Function[n, AllTrue[FactorInteger[n][[All, 1]], AllTrue[# + {-1, 1}, Divisible[n, #] &] &]]] (* Michael De Vlieger, Sep 22 2017 *)

Extensions

a(12)-a(50) from Donovan Johnson, Sep 27 2008
a(1)=1 prepended by Max Alekseyev, Aug 27 2013

A141767 A positive integer k is included if (p-1)*(p+1) divides k for every prime p that divides k.

Original entry on oeis.org

1, 24, 48, 72, 96, 120, 144, 192, 216, 240, 288, 336, 360, 384, 432, 480, 576, 600, 648, 672, 720, 768, 864, 960, 1008, 1080, 1152, 1200, 1296, 1320, 1344, 1440, 1536, 1680, 1728, 1800, 1920, 1944, 2016, 2160, 2304, 2352, 2400, 2592, 2640, 2688, 2880, 3000
Offset: 1

Views

Author

Leroy Quet, Jul 02 2008

Keywords

Comments

For n>1, a(n) is a multiple of 24.

Examples

			120 has the prime factorization of 2^3 * 3^1 * 5^1. The distinct primes dividing 120 are therefore 2,3,5. (2-1)*(2+1)=3, (3-1)*(3+1)=8 and (5-1)*(5+1)=24 all divide 120. So 120 is included in the sequence.
		

Crossrefs

Programs

  • Haskell
    a141767 n = a141767_list !! (n-1)
    a141767_list = filter f [1..] where
       f x = all (== 0) $
             map (mod x) $ zipWith (*) (map pred ps) (map succ ps)
             where ps = a027748_row x
    -- Reinhard Zumkeller, Aug 27 2013
  • Mathematica
    fQ[n_] := Block[{p = First /@ FactorInteger@ n}, Union@ Mod[n, (p - 1) (p + 1)] == {0}]; Select[ Range[2, 3000], fQ@# &] (* Robert G. Wilson v, May 25 2009 *)

Extensions

Added missing term 336 and a(14)-a(47) from Donovan Johnson, Sep 27 2008
a(1)=1 prepended by Max Alekseyev, Aug 27 2013

A226872 1 together with even numbers n >= 2 such that 1^n + 2^n + 3^n + ... + n^n == n/2 (mod n).

Original entry on oeis.org

1, 2, 4, 8, 10, 14, 16, 22, 26, 28, 32, 34, 38, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 74, 76, 82, 86, 88, 92, 94, 98, 104, 106, 112, 116, 118, 122, 124, 128, 130, 134, 136, 142, 146, 148, 152, 154, 158, 164, 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196
Offset: 1

Views

Author

Keywords

Comments

For n>1, a(n) is even. Alternatively, the even terms of this sequence can be characterized in any of the following ways: (i) even integers n such that n*B(n) == n/2 (mod n), where B(n) is the n-th Bernulli number; OR (ii) integers n such that gcd(n,A027642(n)) = 2; OR (iii) even integers n such that (p-1) does not divide n for every odd prime p dividing n (cf. A124240). - Max Alekseyev, Sep 05 2013

Crossrefs

Programs

  • Mathematica
    Join[{1}, Select[Range[200], Mod[Sum[PowerMod[k, #, #], {k, #}], #] == #/2 &]] (* T. D. Noe, Sep 04 2013 *)
  • PARI
    is(n)=if(n%2,return(n==1));my(f=factor(n)[,1]);for(i=2,#f,if(n%(f[i]-1)==0,return(0)));1 \\ Charles R Greathouse IV, Sep 04 2013

A228870 Numbers n such that 2 * (1^n + 2^n + 3^n + ... + n^n) is not 0 (mod n).

Original entry on oeis.org

6, 12, 18, 20, 24, 30, 36, 40, 42, 48, 54, 60, 66, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 180, 186, 192, 198, 200, 204, 210, 216, 220, 222, 228, 234, 240, 246, 252, 258, 260, 264, 270, 272
Offset: 1

Views

Author

T. D. Noe, Sep 06 2013

Keywords

Comments

These are the numbers not appearing in A228869; the even numbers not in A226872.
Also, positive integers n such that there exists an odd prime divisor p of n such that (p-1) also divides n (cf. A124240). - Max Alekseyev, Sep 07 2013
This sequence agrees with A088723 for many terms, but they are different.
If n is in the sequence, then so are the multiples of n. See A280187 for primitive members of this sequence. - Charles R Greathouse IV, Dec 28 2016

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[2*Sum[PowerMod[k, #, #], {k, #}], #] > 0 &]
  • PARI
    is(n)=my(f=factor(n)[,1]); for(i=1,#f, if(n%(f[i]-1)==0 && f[i]>2, return(1))); 0 \\ Charles R Greathouse IV, Dec 28 2016

A341858 Numbers k such that psi(k^2) = k, psi = A002322; indices of 1 in A341857.

Original entry on oeis.org

1, 2, 4, 6, 12, 20, 42, 60, 84, 156, 220, 420, 660, 780, 1092, 1806, 1860, 2436, 3612, 3660, 4620, 5060, 5460, 8268, 8580, 12180, 12324, 13020, 15180, 18060, 20460, 24180, 24492, 25620, 29820, 31668, 40260, 41340, 44220, 46956, 47580, 57876, 60060, 61620, 86268, 88620
Offset: 1

Views

Author

Jianing Song, Feb 21 2021

Keywords

Comments

For all k we have k divides psi(k^2). This sequence gives those k such that the quotient is 1.
Apart from 5 exceptional terms, every term is the product of 4 and distinct odd primes. The exceptional terms are precisely the 5 terms in A014117.
Except for k = 1, 2, 6, 42, 1806, k is a term if and only if k = 4*(p_1)*(p_2)*...*(p_m), where p_1 < p_2 < ... < p_m are odd primes, (p_i)-1 | 4*(p_1)*(p_2)*...*(p_(i-1)) for all 1 <= i <= m.
The LCM of two terms is again in this sequence.
Is this sequence infinite? If this sequence is finite, it means that there exists a term of the form k = 4*(p_1)*(p_2)*...*(p_s), where p_1 < p_2 < ... < p_s are odd primes such that: for every (e_0, e_1, ..., e_s) in {0, 1}^(s+1), 2^((e_0)+1)*(p_1)^(e_1)*(p_2)^(e_2)*...*(p_s)^(e_s)+1 is either composite or equal to some p_i. That term must be divisible by all other terms, since there are no more odd primes q other than p_1, p_2, ..., p_s such that q-1 | k.
Numbers k such that b^k == 1 (mod k^2) for every b coprime to k. Proof: these are numbers k such that psi(k^2) divides k, which holds if and only if psi(k^2) = k. Subsequence of A124240 (see my comment there). If k is a term of the sequence and k+1 is prime, then k*(k+1) is also a term. - Thomas Ordowski, Jul 26 2024

Examples

			1092 = 4 * 3 * 7 * 13 is a term since 3-1 | 4, 7-1 | 4*3 and 13-1 | 4*3*7. Indeed, we have psi(1092^2) = 1092.
5060 = 4 * 5 * 11 * 23 is a term since 5-1 | 4, 11-1 | 4*5 and 23-1 | 4*5*11.
		

Crossrefs

A229289 gives the set of prime factors of the terms.
Subsequence of A124240.

Programs

  • Mathematica
    Select[Range[10^5], CarmichaelLambda[#^2] == # &] (* Paolo Xausa, Mar 11 2024 *)
  • PARI
    isA341858(n) = (A002322(n^2)==n) \\ See A002322 for its program

A345765 Numbers k with property that for p prime, p | k iff (p - 1) | k.

Original entry on oeis.org

1806, 12642, 88494, 6030842622, 259326232746, 11151028008078, 468349207181898, 479494204347354, 20139015908821614, 20618250786936222, 865977684079329402, 886584783838257546, 36371531080539016782, 37237040415411164286, 38123145705045074478, 1563975836463177721626
Offset: 1

Views

Author

Mees de Vries, Jun 26 2021

Keywords

Comments

All terms are divisible by 1806. A345975 provides the terms divided by the common factor.
1806 is the only squarefree term.

Examples

			The prime divisors of 1806 are 2, 3, 7, 43. 1806 is divisible by each of 1, 2, 6, 42. The remaining even divisors of 1806 are 14, 86, 602, 1806, and none of 15, 87, 603 or 1807 are prime.
		

Crossrefs

Subsequence of A124240, which only has the requirement p | k implies (p - 1) | k.
Cf. A345975.

Programs

  • Python
    from sympy import isprime, divisors, primefactors
    def a(n): return all(n % (div + 1) == 0 for div in divisors(n) if isprime(div + 1)) and all(n % (div - 1) == 0 for div in primefactors(n))
    
  • Python
    See De Vries link.

Formula

a(n) = 1806*A345975(n).

A124239 a(n) = Sum_{k=1..n} Sum_{m=1..n} (2*k - 1)^m.

Original entry on oeis.org

1, 14, 197, 3704, 90309, 2704470, 95856025, 3921108576, 181756280697, 9413656622446, 538727822713277, 33757715581666296, 2298714540642445405, 169016703698449309846, 13345320616706684277361, 1126219424250538393789824, 101160070702700567996590513, 9636001314414804672487492878
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2006

Keywords

Comments

a(3) = 197 and a(11) = 538727822713277 are primes.
p divides a(p+1) for primes p > 3.
a(2*k-1) is odd. a(2*k) is even. a(2^k) is divisible by 2^(2*k - 1) for k > 0.
Numbers n such that a(n) is divisible by n are listed in A124240.

Crossrefs

Programs

  • Mathematica
    Table[Sum[(2k-1)^m,{k,1,n},{m,1,n}],{n,1,20}]
  • PARI
    a(n) = sum(k=1, n, sum(m=1, n, (2*k - 1)^m)); \\ Michel Marcus, Apr 24 2022

Formula

a(n) = Sum_{k=1..n} Sum_{m=1..n} (2*k - 1)^m.
a(n) = n + Sum_{k=2..n} (2*k - 1)*((2*k - 1)^n - 1)/(2*(k - 1)).

A228869 Numbers n such that 2 * (1^n + 2^n + 3^n + ... + n^n) == 0 (mod n).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83
Offset: 1

Views

Author

T. D. Noe, Sep 06 2013

Keywords

Comments

See A228870 for the numbers not in this sequence.
Union of A226872 and the positive odd integers (A005408).
Also, positive integers n such that (p-1) does not divide n for every odd prime p dividing n (cf. A124240). - Max Alekseyev, Sep 07 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[2*Sum[PowerMod[k, #, #], {k, #}], #] == 0 &]

A337119 Primes p such that b^(p-1) == 1 (mod p-1) for all b coprime to p-1.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 37, 41, 43, 61, 73, 97, 101, 109, 127, 157, 163, 181, 193, 241, 257, 313, 337, 379, 401, 421, 433, 487, 541, 577, 601, 641, 661, 673, 757, 769, 881, 883, 937, 1009, 1093, 1153, 1201, 1249, 1297, 1321, 1361, 1459, 1601, 1621, 1801, 1861, 1873, 2017, 2029, 2053, 2161, 2269, 2341, 2437, 2521, 2593
Offset: 1

Views

Author

Francois R. Grieu, Aug 17 2020

Keywords

Comments

Equivalently: primes p to p-1 a Novák-Carmichael number A124240.
These p are such that for all x in [0,p), and all b coprime to p-1, x^(b^(p-1)) == x (mod p), this follows from the FLT.
Equivalently, primes p such that for all primes q | p-1, q-1 | p-1. Primes such that p-1 is in A124240. No prime of the form 12k+11 is in this sequence. - Paul Vanderveen, Apr 02 2022
Primes p such that B^(b^(p-1)-1) == 1 (mod p^2) for every B coprime to p and for every b coprime to (p-1)*p. - Thomas Ordowski, Sep 01 2024

Examples

			7 is in the sequence because it is prime, 1 and 5 are the integers (mod 6) coprime to 6; 1^6 mod 6 = 1; and 5^6 mod 6 = 1.
11 is not in the sequence because 3 is coprime to 10; and 3^10 mod 10 = 9 <> 1.
		

Crossrefs

Cf. A124240.

Programs

  • Mathematica
    a={}; For[p=2,p<2600, p=NextPrime[p],b=p-1; While[--b>0&&(GCD[b,p-1]!=1||PowerMod[b,p-1,p-1]==1)];If[b==0,AppendTo[a,p]]];a
    bcpQ[n_]:=Module[{b=Select[Range[n-2],CoprimeQ[n-1,#]&]},AllTrue[ b,PowerMod[ #,n-1,n-1]==1&]]; Select[Prime[Range[400]],bcpQ] (* Harvey P. Dale, Jan 01 2022 *)
  • Python
    from math import gcd
    from sympy import isprime
    def ok(n):
        if not isprime(n): return False
        return all(pow(b, n-1, n-1) == 1 for b in range(2, n) if gcd(b, n-1)==1)
    print([k for k in range(2594) if ok(k)]) # Michael S. Branicky, Apr 02 2022

A277173 Numbers m such that b^sigma(m) == b^phi(m) == b^numdiv(m) == b^m (mod m) for every integer b.

Original entry on oeis.org

1, 2, 6, 12, 24, 60, 120, 126, 240, 420, 480, 504, 672, 780, 1248, 1260, 2340, 2520, 3360, 4680, 5040, 5460, 6240, 6552, 8160, 8736, 9360, 10080, 11424, 16380, 21216, 26208, 27360, 32760, 38304, 43680, 57120, 65520, 71136, 74592, 106080, 131040, 147168, 148512, 171360, 191520, 202464, 325920, 355680, 372960
Offset: 1

Views

Author

David A. Corneth and Altug Alkan, Oct 02 2016

Keywords

Comments

Are terms products products of primes of the form 2^i*3^j + 1, A058383, for some nonnegative i and j? This is true for all terms up to 7.6*10^6. 7600320 is divisible by 29, which isn't of the form 2^j*3^i+1. Up to 10^8, all of the terms are divisible by only 16 distinct prime factors. That is: omega(lcm(all terms up to 10^8)) = 16.
Subsequence of A124240.

Examples

			6 is a term because for the primes up to 6, (2, 3 and 5), b^sigma(6) == b^phi(6) == b^numdiv(6) == b^6 (mod 6). This is sufficient to prove for all values b up to 6.
		

Crossrefs

Cf. A124240.

Programs

  • Mathematica
    fQ[n_] := Block[{b = 2, s = DivisorSigma[1, n], e = EulerPhi[n], d = DivisorSigma[0, n]}, While[b < n && PowerMod[b, s, n] == PowerMod[b, e, n] == PowerMod[b, d, n] == PowerMod[b, n, n], b = NextPrime@ b]; b >= n]; lst = {1}; k = 2; While[k < 400000, If[ fQ@ k, AppendTo[lst, k]]; k ++]; lst (* Robert G. Wilson v, Nov 04 2016 *)
  • PARI
    isk(n, k) = {Mod(k, n)^sigma(n)==Mod(k, n)^n && Mod(k, n)^eulerphi(n)==Mod(k, n)^n && Mod(k, n)^numdiv(n)==Mod(k, n)^n}
    is(n) = my(i);forprime(i=2, n, if(isk(n, i)==0,return(0))) ; 1
    upto(lim) = my(l=List());for(n=1, lim, if(is(n), listput(l,n))); l
Previous Showing 11-20 of 27 results. Next