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

A375703 Minimum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

2, 5, 10, 17, 26, 28, 33, 37, 50, 65, 82, 101, 122, 126, 129, 145, 170, 197, 217, 226, 244, 257, 290, 325, 344, 362, 401, 442, 485, 513, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1001, 1025, 1090, 1157, 1226, 1297, 1332, 1370, 1445, 1522, 1601, 1682, 1729
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2024

Keywords

Comments

Non-perfect-powers A007916 are numbers without a proper integer root.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n has length A375702, first a(n), last A375704, sum A375705.
		

Crossrefs

For prime numbers we have A045344.
For nonsquarefree numbers we have A053806, anti-runs A373410.
For nonprime numbers we have A055670, anti-runs A005381.
For squarefree numbers we have A072284, anti-runs A373408.
The anti-run version is A216765 (same as A375703 with 2 exceptions).
For non-prime-powers we have A373673, anti-runs A120430.
For prime-powers we have A373676, anti-runs A373575.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1.
- first: A375703 (this)
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Min/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#-1]&]

Formula

Numbers k > 0 such that k-1 is a perfect power (A001597) but k is not.

A375704 Maximum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

3, 7, 15, 24, 26, 31, 35, 48, 63, 80, 99, 120, 124, 127, 143, 168, 195, 215, 224, 242, 255, 288, 323, 342, 360, 399, 440, 483, 511, 528, 575, 624, 675, 728, 783, 840, 899, 960, 999, 1023, 1088, 1155, 1224, 1295, 1330, 1368, 1443, 1520, 1599, 1680, 1727, 1763
Offset: 1

Views

Author

Gus Wiseman, Aug 29 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.
Also numbers k > 0 such that k is a perfect power (A001597) but k+1 is not.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n begins with A375703(n), ends with a(n), adds up to A375705(n), and has length A375702(n).
		

Crossrefs

For nonprime numbers: A006093, min A055670, anti-runs A068780, min A005381.
For prime numbers we have A045344.
Inserting 8 after 7 gives A045542.
For nonsquarefree numbers we have A072284(n) + 1, anti-runs A068781.
For squarefree numbers we have A373415, anti-runs A007674.
For prime-powers we have A373674 (min A373673), anti-runs A006549 (A120430).
Non-prime-powers: A373677 (min A373676), anti-runs A255346 (min A373575).
The anti-run version is A375739.
A001597 lists perfect-powers, differences A053289.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (this) (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Max/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#+1]&]

Formula

For n > 2 we have a(n) = A045542(n+1).

A055672 Number of right-inequivalent prime Hurwitz quaternions of norm n.

Original entry on oeis.org

0, 0, 1, 4, 0, 6, 0, 8, 0, 0, 0, 12, 0, 14, 0, 0, 0, 18, 0, 20, 0, 0, 0, 24, 0, 0, 0, 0, 0, 30, 0, 32, 0, 0, 0, 0, 0, 38, 0, 0, 0, 42, 0, 44, 0, 0, 0, 48, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 60, 0, 62, 0, 0, 0, 0, 0, 68, 0, 0, 0, 72, 0, 74, 0, 0, 0, 0, 0, 80, 0, 0, 0, 84, 0, 0, 0, 0, 0, 90
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2000

Keywords

Comments

Two primes are considered right-equivalent if they differ by right multiplication by one of the 24 units.
The extension desired below does not exist in the following sense: Let q1 ~R q2 be the equivalence defined by q1 = q2*u (i.e. if q1 and q2 any two HQ's, a unit u exists that solves this). Let q1 ~L q2 be the equivalence defined by q1 = u*q2 (i.e. if q1 and q2 any two HQ's a unit u exists that solves this.) If we define a relation ~RL such that q1 ~RL q2 means (q1 ~R q2 or q1 ~L q2), this relation is not transitive, i.e., not an equivalence. Cause: q1 = q2*u1, q2 = u2*q3, i.e., q1 ~R q2, q2 ~L q3 does not always have a solution with either q1 = q3*u3 or q1= u3*q3. There are pairs of u1 and u2 out of the 24*24 cases where q1 ~L q3 or q1 ~L q3 cannot be solved with any u3. - R. J. Mathar, Aug 05 2025

References

  • L. E. Dickson, Algebras and Their Arithmetics, Dover, 1960, Section 91.

Crossrefs

Cf. A055669 A055670 (zeros removed), A055671, A385603 (equivalence up to left-and-right multiplication).

Programs

  • Mathematica
    A055671[n_] := If[PrimeQ[n], Reduce[a^2 + b^2 + c^2 + d^2 == 4n, {a, b, c, d}, Integers] // Length, 0]; a[n_] := A055671[n]/24; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 22 2016 *)

Formula

a(n) = A055671(n)/24.
a(n) = A000593(n) * A010051(n). - R. J. Mathar, Aug 02 2025

Extensions

I would also like to get the sequences of inequivalent prime Hurwitz quaternions, where two primes are considered equivalent if they differ by left or right multiplication by one of the 24 units. This will give two more sequences, analogs of A055670 and A055672.

A055669 Number of prime Hurwitz quaternions of norm prime(n).

Original entry on oeis.org

24, 96, 144, 192, 288, 336, 432, 480, 576, 720, 768, 912, 1008, 1056, 1152, 1296, 1440, 1488, 1632, 1728, 1776, 1920, 2016, 2160, 2352, 2448, 2496, 2592, 2640, 2736, 3072, 3168, 3312, 3360, 3600, 3648, 3792, 3936, 4032, 4176, 4320, 4368, 4608, 4656, 4752
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2000

Keywords

Comments

Number of vectors of norm p in D_4 lattice (cf. A004011).

References

  • L. E. Dickson, Algebras and Their Arithmetics, Dover, 1960, Section 91.

Crossrefs

Cf. A240068 (number of prime Lipschitz quaternions having norm prime(n)).

Programs

  • Mathematica
    Join[{24},24(#+1)&/@Prime[Range[2,50]]] (* Harvey P. Dale, Mar 12 2013 *)

Formula

a(n) = 24 * (prime(n)+1) = 24 * A008864(n) for n >= 2.
a(n) = 24*A055670(n).
a(n) = A004011(prime(n)). - R. J. Mathar, Aug 01 2025

Extensions

More terms from David W. Wilson, May 02 2001

A061673 Even numbers k such that k+1 and k-1 are both composite.

Original entry on oeis.org

26, 34, 50, 56, 64, 76, 86, 92, 94, 116, 118, 120, 122, 124, 134, 142, 144, 146, 154, 160, 170, 176, 184, 186, 188, 202, 204, 206, 208, 214, 216, 218, 220, 236, 244, 246, 248, 254, 260, 266, 274, 286, 288, 290, 296, 298, 300, 302, 304, 320, 322, 324, 326
Offset: 1

Views

Author

Enoch Haga, Jun 16 2001

Keywords

Comments

If a(n + 1) > a(n) + 2 then a(n) + 3 and a(n + 1) - 3 are both prime. - Joseph Wheat, Mar 16 2025

Examples

			a(3)=50 because 50 - 1 = 49 and 50 + 1 = 51 and both 49 and 51 are composite.
		

Crossrefs

A025583(n-1) - 1.

Programs

  • GAP
    Filtered([0,2..340],n->not IsPrime(n-1) and not IsPrime(n+1)); # Muniru A Asiru, Jul 01 2018;
    
  • Haskell
    a061673 n = a061673_list !! (n-1)
    a061673_list = filter bothComp [4,6..] where
       bothComp n = (1 - a010051 (n-1)) * (1 - a010051 (n+1)) > 0
    -- Reinhard Zumkeller, Feb 27 2011
    
  • Mathematica
    fQ[n_] := !PrimeQ[n - 1] && !PrimeQ[n + 1]; Select[2 Range@ 163, fQ]
    Select[Range[2,400,2],AllTrue[#+{1,-1},CompositeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 01 2014 *)
    2*SequencePosition[Table[If[CompositeQ[n],1,0],{n,1,351,2}],{1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 04 2020 *)
  • PARI
    { n=0; forstep (a=2, 3986, 2, if (!isprime(a+1) && !isprime(a-1), write("b061673.txt", n++, " ", a)) ) } \\ Harry J. Smith, Jul 26 2009
    
  • Python
    from sympy import isprime
    def abelow(limit):
      for k in range(2, limit, 2):
        if not isprime(k-1) and not isprime(k+1): yield k
    print([an for an in abelow(327)]) # Michael S. Branicky, Jan 02 2021

A175216 The first nonprimes after the primes.

Original entry on oeis.org

4, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Comments

Essentially the same as A135731, A055670, A028815 and A008864. [R. J. Mathar, Mar 13 2010]

Crossrefs

Programs

  • Magma
    [n eq 1 select 4 else NthPrime(n) +1: n in [1..100]]; // G. C. Greubel, Aug 06 2024
    
  • Mathematica
    Table[Prime[n] +1 +Boole[n==1], {n,100}] (* G. C. Greubel, Aug 06 2024 *)
  • SageMath
    def A175216(n): return nth_prime(n) +1 +int(n==1)
    [A175216(n) for n in range(1,101)] # G. C. Greubel, Aug 06 2024

Formula

a(1) = 4, for n >= 2, a(n) = A008864(n) = A000040(n) + 1.

A055671 Number of prime Hurwitz quaternions of norm n.

Original entry on oeis.org

0, 0, 24, 96, 0, 144, 0, 192, 0, 0, 0, 288, 0, 336, 0, 0, 0, 432, 0, 480, 0, 0, 0, 576, 0, 0, 0, 0, 0, 720, 0, 768, 0, 0, 0, 0, 0, 912, 0, 0, 0, 1008, 0, 1056, 0, 0, 0, 1152, 0, 0, 0, 0, 0, 1296, 0, 0, 0, 0, 0, 1440, 0, 1488, 0, 0, 0, 0, 0, 1632, 0, 0, 0, 1728, 0, 1776, 0, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2000

Keywords

References

  • L. E. Dickson, Algebras and Their Arithmetics, Dover, 1960, Section 91.

Crossrefs

Cf. A055669 (zeros removed), A055670, A055671, A055672.

Programs

Formula

a(n) = number of vectors of norm n in D_4 lattice (A004011) if n is a prime, otherwise a(n) = 0.

Extensions

More terms from Lambert Klasen (Lambert.Klasen(AT)gmx.net), Jun 10 2005

A083502 Smallest k such that n*(n+k) + 1 is an n-th power.

Original entry on oeis.org

1, 2, 18, 16, 1550, 2598, 299586, 812, 29118, 348678430, 67546215506, 20345040, 61054982557998, 281241170407078, 76861433640456450, 2690404, 128583032925805678334, 211927625850, 275941052631578947368402, 174339200
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 03 2003

Keywords

Comments

Sequence is obviously infinite.
If the sequence is restricted to only prime n's, the sequence increases absolutely. See comment in A083503.
[Since there is actually no comment in A083503: this probably means to say that (conjectural!) A083503(prime(n)) = A008864(n) which leads to a(p) = Sum_{s=2..p} binomial(p,s)*p^(s-1) for primes p, an increasing subsequence. - R. J. Mathar, Aug 01 2025]
a(n) = (x^n-1)/n - n, where x is the least integer > 1 with x^n == 1 (mod n). - Robert Israel, Aug 01 2025

Crossrefs

The i's in the above Mathematica coding, except for a(1), give A055670.

Programs

  • Maple
    A083502 := proc(n)
        local a,b ;
        if n = 1 then
            1 ;
        else
            for b from 2 do
                a := (b^n-1)/n-n ;
                if type( a,'integer') then
                    return  a;
                end if;
            end do:
        end if;
    end proc:
    seq(A083502(n),n=1..20) ; # R. J. Mathar, Aug 01 2025
    # alternative
    f:= proc(n) local X,S;
      S:= min(map(t -> subs(t,X), {msolve(X^n = 1, n)} minus {{X=1}}));
      if S = infinity then ((n+1)^n - 1)/n - n else (S^n-1)/n - n fi
    end proc:
    f(1):= 1:
    map(f, [$1..50]); # Robert Israel, Aug 01 2025
  • Mathematica
    Do[i = 2; While[k = (i^n - 1)/n - n; !IntegerQ[k], i++ ]; Print[k], {n, 1, 20}]

Extensions

Edited and extended by Robert G. Wilson v, May 11 2003

A299763 a(n) = 1 + A182986(n).

Original entry on oeis.org

1, 3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272, 278, 282, 284
Offset: 1

Views

Author

Omar E. Pol, Mar 14 2018

Keywords

Comments

Are these the indices of the rows of A299762 where there is a record?

Crossrefs

First differences are in A054541.
Essentially the same as A008864, A028815, A055670, A135731, A175216.

Programs

Formula

a(n) = A028815(n-1) - [n=1].
a(n) = A008864(n-1) for n >= 2, with a(1) = 1.

A366851 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n such that the sum of primes indexed by all parts greater than one is k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 01 2023

Keywords

Comments

To illustrate the definition, the sum of primes indexed by all parts greater than one of the partition (5,2,2,1) is prime(5) + prime(2) + prime(2) = 17.

Examples

			Triangle begins:
  1
  1
  1 0 0 1
  1 0 0 1 0 1
  1 0 0 1 0 1 1 1
  1 0 0 1 0 1 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 2 0 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 2 2 2 2 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 4 2 3 2 0 3 1 0 0 0 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 5 4 4 3 3 3 2 3 0 1 0 0 1 0 1
The T(8,13) = 3 partitions are: (6,1,1), (4,2,2), (3,3,2).
The T(10,17) = 4 partitions are: (7,1,1,1), (5,2,2,1), (4,4,2), (4,3,3).
		

Crossrefs

Row lengths are A055670.
Columns appear to converge to A099773.
A bisected even version is A116598 (counts partitions by number of 1's).
Counting all parts (not just > 1) gives A331416, shifted A331385.
A000041 counts integer partitions, strict A000009 (also into odds).
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A330953 counts partitions with Heinz number divisible by sum of primes.
A331381 counts partitions with (product)|(sum of primes), equality A331383.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Select[Prime/@#,OddQ]]==k&]], {n,0,10}, {k,0,If[n<=1,0,Prime[n]]}]
Showing 1-10 of 12 results. Next