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

A082916 Numbers k such that k and binomial(2*k, k) are relatively prime.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 37, 39, 41, 43, 47, 49, 53, 55, 59, 61, 67, 71, 73, 79, 81, 83, 89, 93, 97, 101, 103, 107, 109, 111, 113, 119, 121, 125, 127, 131, 137, 139, 149, 151, 155, 157, 161, 163, 167, 169, 173, 179, 181, 185, 191, 193, 197
Offset: 1

Views

Author

Benoit Cloitre, May 25 2003

Keywords

Comments

Also the numbers k such that every base-p digit of k is less than p/2, for every prime divisor p of k. Contains all odd primes and their powers. - David Radcliffe, Jun 28 2025

References

  • J. Glaisher, On the residue of a binomial-theorem coefficient with respect to a prime modulus, Quarterly J. of Pure and Applied Math. 30 (1899), 150-156.

Crossrefs

Cf. A000984 (central binomial coefficients). Contains A061345.

Programs

  • Mathematica
    Select[Range[0, 100], CoprimeQ[Binomial[2*#, #], #] &] (* Amiram Eldar, May 24 2020 *)
  • PARI
    isok(n) = gcd(n, binomial(2*n, n)) == 1; \\ Michel Marcus, Dec 04 2013
    
  • Python
    from math import gcd
    A082916_list, b = [], 1
    for n in range(10**5):
        if gcd(n,b) == 1:
            A082916_list.append(n)
        b = b*(4*n+2)//(n+1) # Chai Wah Wu, Mar 25 2016

Formula

It seems that a(n) is asymptotic to c*n*log(n) with 0.7

A087688 a(n) = number of solutions to x^3 - x == 0 (mod n).

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 3, 5, 3, 6, 3, 9, 3, 6, 9, 5, 3, 6, 3, 9, 9, 6, 3, 15, 3, 6, 3, 9, 3, 18, 3, 5, 9, 6, 9, 9, 3, 6, 9, 15, 3, 18, 3, 9, 9, 6, 3, 15, 3, 6, 9, 9, 3, 6, 9, 15, 9, 6, 3, 27, 3, 6, 9, 5, 9, 18, 3, 9, 9, 18
Offset: 1

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

Keywords

Comments

Shadow transform of A007531. - Michel Marcus, Jun 06 2013
a(n) = 3 iff n belongs to (A061345 \ {1}) Union {4}. - Bernard Schott, Sep 16 2019

Crossrefs

Programs

  • Maple
    A087688 := proc(n) local a,x ; a := 0 ; for x from 0 to n-1 do if (x*(x^2-1)) mod n = 0 then a := a+1 ; end if; end do; a ; end proc:
    seq(A087688(n),n=1..70) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    nsols[n_]:=Length[Select[Range[0,n-1],Mod[#^3-#,n]==0&]]; nsols/@Range[80]  (* Harvey P. Dale, Mar 22 2011 *)
    f[2, e_] := Which[e == 1, 2, e == 2, 3, e >= 3, 5]; f[p_, e_] := 3; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n)=if(n%2,3^omega(n),my(v=valuation(n,2));3^omega(n>>v)*[2,3,5][min(3,v)]) \\ Charles R Greathouse IV, Mar 22 2011

Formula

Multiplicative with a(p^e) = 3 for p an odd prime, a(2^1) = 2, a(2^2) = 3, a(2^e) = 5 for e >= 3. - Eric M. Schmidt, Apr 08 2013

A115233 Primes p which have a unique representation as p = 2^i + q^j where i >= 0, j >= 1, q = odd prime.

Original entry on oeis.org

5, 127, 163, 179, 191, 193, 223, 239, 251, 269, 311, 337, 389, 419, 431, 457, 491, 547, 557, 569, 599, 613, 653, 659, 673, 683, 719, 739, 787, 821, 839, 853, 883, 911, 929, 953, 967, 977, 1117, 1123, 1201, 1229, 1249, 1283, 1289, 1297, 1303, 1327, 1381, 1409, 1423, 1439, 1451, 1471, 1481, 1499
Offset: 1

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Examples

			5 = 2+3 belongs to the sequence, but 23 = 2^2+19^1 = 2^4+7^1 does not.
		

Crossrefs

Subsequence of A115232. Cf. A115230, A115231.

Programs

  • Mathematica
    maxp = 1500; Clear[cnt]; cnt[_] = 0;
    pp = Prime[Range[PrimePi[maxp]]];
    Do[p = 2^i + q^j; If[p <= maxp && PrimeQ[p], cnt[p] = cnt[p] + 1], {i, 0, Log[2, maxp] // Ceiling}, {j, 1, Log[3, maxp] // Ceiling}, {q, Rest[pp]}
    ];
    Select[pp, cnt[#] == 1&] (* Jean-François Alcover, Aug 04 2018 *)

Extensions

Recomputed (based on recomputation of A115230) by R. J. Mathar and Reinhard Zumkeller, Apr 29 2010.
Edited by N. J. A. Sloane, Apr 30 2010
Data corrected by Jean-François Alcover, Aug 04 2018

A118112 a(n) = binomial(3n,n) mod (n+1).

Original entry on oeis.org

1, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 19, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 35, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Author

Labos Elemer, Apr 13 2006

Keywords

Comments

These divisibilities are analogous to those of Catalan numbers. For rather long sequences of consecutive integers, a(n)=0. For the first 10000 integers 9678 residues equals zero. See A118113.
If n+1 is in A061345, a(n)=0. This follows from Kummer's theorem. - Robert Israel, May 09 2018

Examples

			For n=9, binomial(27,7) = 4686825; 4686825 mod 10 = 5.
		

Crossrefs

Programs

  • Maple
    seq(binomial(3*n,n) mod (n+1), n=1..200); # Robert Israel, May 09 2018
  • Mathematica
    Table[Mod[Binomial[3*k,k],k+1],{k,500}]
  • PARI
    a(n) = binomial(3*n, n) % (n+1); \\ Michel Marcus, May 10 2018

Formula

a(n) = binomial(3n,n) mod (n+1).

Extensions

Mathematica program corrected by Harvey P. Dale, Dec 28 2012

A132213 Number of distinct primes among the squares mod n.

Original entry on oeis.org

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

Author

T. D. Noe, Aug 13 2007, Aug 17 2007

Keywords

Comments

It appears that a(n)=0 for only the 30 numbers in A065428, which appears to be related to idoneal numbers, A000926. The graph shows a(n) can be quite small even for large n. For example, a(9240)=7. Observe that the graph up to n=10000 appears to have 5 components. Why?
The logarithmic plot of the first 10^6 terms shows seven components.
From Rémy Sigrist, Nov 28 2017: (Start)
Empirically, in the logarithmic plot of the sequence:
- the set of indices of the first component (starting from the top), say S_1, is the union of A061345 and of A278568,
- the set of indices of the n-th component (for n > 1), say S_n, contains the numbers k not in a previous component and such that (omega(k) = n-1) or (omega(k) = n and val(k) = 0 or 2) or (omega(k) = n+1 and val(k) = 1) (where omega(k) = A001221(k) and val(k) = A007814(k)),
- see logarithmic scatterplot colored according to this scheme in Links section.
(End)

Examples

			For n=14, the squares (mod n) repeat 0,1,4,9,2,11,8,7,8,11,2,9,4,1,0,..., a sequence containing three distinct primes: 2, 7 and 11. Hence a(14)=3.
		

Crossrefs

Cf. A000224 (number of squares mod n).

Programs

  • Haskell
    import Data.List (nub, genericTake)
    a132213 n = sum $ map a010051' $
                nub $ genericTake n $ map (`mod` n) $ tail a000290_list
    -- Reinhard Zumkeller, Jun 23 2015, Oct 15 2011
  • Mathematica
    Table[s=Union[Mod[Range[n]^2,n]]; Length[Select[s,PrimeQ]], {n,10000}]
    Table[Count[Union[PowerMod[Range[n],2,n]],?PrimeQ],{n,100}] (* _Harvey P. Dale, Mar 02 2018 *)

A280152 Expansion of Product_{k>=1} (1 + floor(1/omega(2*k+1))*x^(2*k+1)), where omega() is the number of distinct prime factors (A001221).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 3, 3, 3, 3, 4, 4, 5, 4, 6, 6, 6, 7, 7, 9, 8, 9, 10, 11, 12, 11, 14, 14, 16, 15, 18, 19, 19, 21, 22, 25, 25, 27, 28, 32, 32, 34, 36, 40, 41, 42, 47, 49, 52, 53, 57, 62, 63, 67, 71, 76, 79, 82, 88, 93, 98, 100, 108, 114, 118, 124
Offset: 0

Author

Ilya Gutkovskiy, Dec 27 2016

Keywords

Comments

Number of partitions of n into distinct odd prime powers (1 excluded).

Examples

			a(16) = 3 because we have [13, 3], [11, 5], [9, 7].
		

Crossrefs

Programs

  • Mathematica
    nmax = 78; CoefficientList[Series[Product[1 + Floor[1/PrimeNu[2 k + 1]] x^(2 k + 1), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + floor(1/omega(2*k+1))*x^(2*k+1)).

A316553 Number of elements of order 2 in the group SL(2, Z(n)).

Original entry on oeis.org

0, 3, 1, 7, 1, 7, 1, 15, 1, 7, 1, 15, 1, 7, 3, 15, 1, 7, 1, 15, 3, 7, 1, 31, 1, 7, 1, 15, 1, 15, 1, 15, 3, 7, 3, 15, 1, 7, 3, 31, 1, 15, 1, 15, 3, 7, 1, 31, 1, 7, 3, 15, 1, 7, 3, 31, 3, 7, 1, 31, 1, 7, 3, 15, 3, 15, 1, 15, 3, 15, 1, 31, 1, 7, 3, 15, 3, 15, 1
Offset: 1

Author

Andrew Howroyd, Jul 06 2018

Keywords

Comments

Equivalently, the number of cyclic subgroups of the group SL(2, Z(n)) having order 2, counting conjugates as distinct.

Examples

			Case n=2: the three 2 X 2 matrices on Z(2) having determinant 1 and order 2 are:
  [ 0 1 ]   [ 1 0 ]   [ 1 1 ]
  [ 1 0 ]   [ 1 1 ]   [ 0 1 ]
		

Crossrefs

Column 2 of A316564.
Cf. A061345.

Programs

  • GAP
    Concatenation([0], List([2..10], n->Sum(Filtered( ConjugacyClassesSubgroups( SL(2, Integers mod n)), x->Order( Representative(x))=2 and IsCyclic( Representative(x))), Size)));
    
  • PARI
    a(n)={my(id=matid(2)); sum(a=0, n-1, sum(b=0, n-1, sum(c=0, n-1, sum(d=0, n-1, my(M=Mod([a, b; c, d], n)); if(matdet(M)==1, M^2==id))))) - 1}
    
  • PARI
    memoA316553 = Map(); \\ Only values at 2^k are actually collected here.
    A316553slow_memoized(n) = if(1==n, 0, if((n%2)&&isprimepower(n), 1, my(id=matid(2), v); if(mapisdefined(memoA316553,n,&v), v, v = (sum(a=0, n-1, sum(b=0, n-1, sum(c=0, n-1, sum(d=0, n-1, my(M=Mod([a, b; c, d], n)); if(matdet(M)==1, M^2==id))))) - 1); mapput(memoA316553,n,v); (v))));
    A316553(n) = if(1==n,0,my(f=factor(n)); -1 + prod(i=1,#f~,1+A316553slow_memoized(f[i,1]^f[i,2]))); \\ (Based on Robert Israel's multiplicativity rule) - Antti Karttunen, Dec 05 2021

Formula

Conjecture: a(n) = 2^(omega(n) + min(3, valuation(n, 2))) - 1.
From Robert Israel, Jun 15 2020: (Start)
Number of solutions mod n, other than t[1]=t[4]=1,t[2]=t[3]=0, of the equations t[2]*(t[1] + t[4])=0, t[3]*(t[1] + t[4])=0, t[1]^2 + t[2]*t[3] = 1, t[2]*t[3] + t[4]^2 = 1, t[1]*t[4] - t[2]*t[3] = 1.
If m and n are coprime, a(m*n) = a(m)*a(n)+a(m)+a(n) (i.e. a(n)+1 is multiplicative).
If n > 1 is in A061345, a(n)=1. (End)

A384233 Square array read by upward antidiagonals: T(n,k) is the n-th number whose largest odd noncomposite divisor is its k-th divisor, n >= 1, k >= 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 10, 20, 16, 9, 12, 28, 42, 32, 11, 14, 30, 60, 84, 64, 13, 15, 40, 66, 132, 156, 128, 17, 18, 44, 78, 168, 204, 312, 256, 19, 21, 52, 88, 198, 228, 408, 684, 512, 23, 22, 56, 102, 210, 264, 456, 696, 1020, 1024, 25, 24, 68, 104, 220, 276, 468, 744, 1140, 1380
Offset: 1

Author

Omar E. Pol, May 22 2025

Keywords

Comments

This is a permutation of the positive integers.

Examples

			The corner 15 X 15 of the square array is as follows:
      1,  3,  6,  20,  42,  84, 156, 312,  684, 1020, 1380, 1860, 3480, 3720,  4920, ...
      2,  5, 10,  28,  60, 132, 204, 408,  696, 1140, 1740, 2220, 3660, 4440,  5160, ...
      4,  7, 12,  30,  66, 168, 228, 456,  744, 1332, 2040, 2460, 4020, 5580,  5640, ...
      8,  9, 14,  40,  78, 198, 264, 468,  780, 1368, 2088, 2580, 4140, 6960,  6360, ...
     16, 11, 15,  44,  88, 210, 276, 510,  816, 1392, 2232, 2664, 4260, 7224,  6660, ...
     32, 13, 18,  52, 102, 220, 330, 552,  828, 1476, 2280, 2760, 4380, 7632,  7080, ...
     64, 17, 21,  56, 104, 234, 342, 570,  888, 1488, 2436, 2820, 4740, 7896,  7380, ...
    128, 19, 22,  68, 110, 252, 348, 612,  912, 1548, 2544, 2952, 4872, 8280,  7440, ...
    256, 23, 24,  70, 114, 260, 372, 624,  930, 1560, 2604, 3096, 4980, 8496,  7740, ...
    512, 25, 26,  76, 120, 272, 390, 660,  936, 1656, 2736, 3180, 5208, 8784,  8880, ...
   1024, 27, 33,  80, 126, 304, 396, 690,  984, 1692, 2790, 3384, 5220, 8904,  9912, ...
   2048, 29, 34,  90, 130, 306, 414, 792, 1032, 1710, 2832, 3420, 5256, 9030, 10248, ...
   4096, 31, 35,  92, 136, 336, 420, 870, 1044, 1776, 2928, 3540, 5328, 9324, 10440, ...
   8192, 37, 36,  99, 138, 340, 440, 920, 1104, 1908, 3060, 3612, 5340, 9648, 10512, ...
  16384, 41, 38, 100, 140, 368, 444, 966, 1110, 1932, 3108, 3816, 5520, 9660, 10836, ...
  ...
The divisors of 42 are [1, 2, 3, 6, 7, 14, 21, 42] and the largest odd noncomposite divisor is 7 and 7 is its 5th divisor, so T(1,5) = 42 because 42 the smallest number having that property.
		

Crossrefs

Companion of A383961.
Row 1 gives A384232.
Column 1 gives A000079.

Programs

  • Mathematica
    f[n_] := FirstPosition[Divisors[n], FactorInteger[n/2^IntegerExponent[n, 2]][[-1, 1]]][[1]]; seq[m_] := Module[{t = Table[0, {m}, {m}], v = Table[0, {m}], c = 0, k = 1, i, j}, While[c < m*(m + 1)/2, i = f[k]; If[i <= m, j = v[[i]] + 1; If[j <= m - i + 1, t[[i]][[j]] = k; v[[i]]++; c++]]; k++]; Table[t[[j]][[i - j + 1]], {i, 1, m}, {j, 1, i}] // Flatten]; seq[11] (* Amiram Eldar, May 23 2025 *)

Formula

Conjecture: T(n,2) = A061345(n).

A061344 Numbers of form p^m + 1, p odd prime, m >= 1.

Original entry on oeis.org

4, 6, 8, 10, 12, 14, 18, 20, 24, 26, 28, 30, 32, 38, 42, 44, 48, 50, 54, 60, 62, 68, 72, 74, 80, 82, 84, 90, 98, 102, 104, 108, 110, 114, 122, 126, 128, 132, 138, 140, 150, 152, 158, 164, 168, 170, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240
Offset: 1

Author

Hans Dieter Lueke (lueke(AT)ient.rwth-aachen.de), Jun 08 2001

Keywords

Comments

Lengths of almost-binary sequences with perfect odd-periodic autocorrelation function.
As J. Arndt points out, each element of this sequence leads to a conference matrix (cf. link to Wikipedia and A000952). - M. F. Hasler, Mar 14 2008

References

  • H. D. Lueke, Binary odd-periodic complementary sequences. IEEE Trans. Inform. Theory, 43, pp. 365-367, 1997.

Crossrefs

Equals A061345 + 1. Cf. A000952.

Programs

  • PARI
    A061344(n)= local(m=1,p); for(c=1,n, until( isprime(m+=2) || ispower(m,[null], && p) && isprime(p),); /*print(c," ",m+1)*/); m+1 \\ - M. F. Hasler, Mar 14 2008
    
  • Python
    from sympy import primepi, integer_nthroot
    def A061344(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)+1 # Chai Wah Wu, Feb 03 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001
Edited by M. F. Hasler, Mar 14 2008

A064077 Greater of odd twin prime powers (lesser = A064076).

Original entry on oeis.org

5, 7, 9, 11, 13, 19, 25, 27, 29, 31, 43, 49, 61, 73, 81, 83, 103, 109, 127, 139, 151, 169, 181, 193, 199, 229, 241, 243, 271, 283, 313, 349, 361, 421, 433, 463, 523, 571, 601, 619, 643, 661, 729, 811, 823, 829, 841, 859, 883, 1021, 1033, 1051, 1063, 1093, 1153
Offset: 1

Author

Reinhard Zumkeller, Sep 01 2001

Keywords

Comments

A006512 is a proper subsequence of this sequence (as A001359 is of A064076).

Examples

			a(16) = 83^1 and 83 - 1 = 81 = 3^4 = A064076(16); a(20) = 139^1 and 139 - 2 = 137^1 = A064077(20).
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Select[Range[1, 1200, 2], PrimePowerQ], 2, 1], Differences[#] == {2} &][[;; , 2]] (* Amiram Eldar, Mar 19 2025 *)

Formula

a(n) = A064076(n) + 2. - Amiram Eldar, Mar 19 2025
Previous Showing 21-30 of 49 results. Next