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

A373404 Sum of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

18, 9, 36, 15, 54, 21, 46, 25, 26, 27, 90, 33, 34, 35, 74, 39, 126, 45, 94, 49, 50, 51, 106, 55, 56, 57, 180, 63, 64, 65, 134, 69, 216, 75, 76, 77, 158, 81, 166, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373403.
An antirun of a sequence (in this case A002808) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row sums of:
   4   6   8
   9
  10  12  14
  15
  16  18  20
  21
  22  24
  25
  26
  27
  28  30  32
  33
  34
  35
  36  38
  39
  40  42  44
		

Crossrefs

Partial sums are a subset of A053767 (partial sums of composite numbers).
Functional neighbors: A005381, A054265, A068780, A373403, A373405, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],CompositeQ],#1+1!=#2&]//Most

A373821 Run-lengths of run-lengths of first differences of odd primes.

Original entry on oeis.org

1, 11, 1, 19, 1, 1, 1, 5, 1, 6, 1, 16, 1, 27, 1, 3, 1, 1, 1, 6, 1, 9, 1, 29, 1, 2, 1, 18, 1, 1, 1, 5, 1, 3, 1, 17, 1, 19, 1, 30, 1, 17, 1, 46, 1, 17, 1, 27, 1, 30, 1, 5, 1, 36, 1, 41, 1, 10, 1, 31, 1, 44, 1, 4, 1, 14, 1, 6, 1, 2, 1, 32, 1, 13, 1, 17, 1, 5
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-lengths of A333254.
The first term other than 1 at an odd positions is at a(101) = 2.
Also run-lengths (differing by 0) of run-lengths (differing by 0) of run-lengths (differing by 1) of composite numbers.

Examples

			The odd primes are:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with first differences:
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, ...
with run-lengths:
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, ...
with run-lengths a(n).
		

Crossrefs

Run-lengths of run-lengths of A046933(n) = A001223(n) - 1.
Run-lengths of A333254.
A000040 lists the primes.
A001223 gives differences of consecutive primes.
A027833 gives antirun lengths of odd primes (partial sums A029707).
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.
For prime runs: A001359, A006512, A025584, A067774, A373406.
For composite runs: A005381, A008864, A054265, A176246, A251092, A373403.

Programs

  • Mathematica
    Length/@Split[Length /@ Split[Differences[Select[Range[3,1000],PrimeQ]]]//Most]//Most

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

A093515 Numbers k such that either k or k-1 is a prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 23, 24, 29, 30, 31, 32, 37, 38, 41, 42, 43, 44, 47, 48, 53, 54, 59, 60, 61, 62, 67, 68, 71, 72, 73, 74, 79, 80, 83, 84, 89, 90, 97, 98, 101, 102, 103, 104, 107, 108, 109, 110, 113, 114, 127, 128, 131, 132, 137, 138, 139
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

Original name: Transform of the prime sequence by the Rule 110 cellular automaton.
As described in A051006, a monotonic sequence can be mapped into a fractional real. Then the binary digits of that real can be treated (transformed) by an elementary cellular automaton. Taking the resulting sequence of binary digits as a fractional real, it can be mapped back into a sequence, as in A092855.
From M. F. Hasler, Mar 01 2008: (Start)
The "Rule110" transform as used here involves a right-shift of the sequence before applying the transform as described on the MathWorld page.
Robert G. Wilson v observed that this sequence contains exactly the indices for which A121561 equals 1. (End)
From M. F. Hasler, Jan 07 2019: (Start)
The correspondence of monotonic sequences with fractional reals mentioned in the first comment is not really relevant here: RuleX most naturally maps directly one characteristic sequence to another and thus one set (or increasing sequence) to another one. Interpreting the characteristic sequences as binary digits of a fractional real then yields a map from [0,1] into [0,1] rather as a consequence.
Antti Karttunen observed that this seems to be the complement of A005381 (k and k-1 are composite). This is indeed the case: The characteristic sequence of primes has no three subsequent 1's. In all other cases of the 8 possible inputs for Rule110, the output is 0 if and only if the cell itself and its neighbor to the right are zero, which here means "k and k+1 are composite", and with the right shift mentioned above, the complement of A005381, i.e., numbers such that k or k-1 is prime (or: primes U primes + 1). We have actually proved the more general
Theorem: Rule110 transforms any set S having no three consecutive integers into the set S' = {k | k or k-1 is in S} = S U (1 + S). (End)

Crossrefs

Cf. A005381 (complement, apart from 1 which is in neither sequence), A323162.
Cf. A121561.

Programs

  • Magma
    [n: n in [2..180] | not(not IsPrime(n) and not IsPrime(n-1))]; // Vincenzo Librandi, Jan 08 2019
    
  • Mathematica
    Select[Range[2, 150], !(!PrimeQ[# - 1] && !PrimeQ[#]) &] (* Vincenzo Librandi, Jan 08 2019 *)
  • PARI
    {ca_tr(ca,v)= /* Calculates the Cellular Automaton transform of the vector v by the rule ca */
    local(cav=vector(8),a,r=[],i,j,k,l,po,p=vector(3));
    a=binary(min(255,ca));k=matsize(a)[2];forstep(i=k,1,- 1,cav[k-i+1]=a[i]);
    j=0;l=matsize(v)[2];k=v[l];po=1;
    for(i=1,k+2,j*=2;po=isin(i,v,l,po);j=(j+max(0,sign(po)))% 8;if(cav[j+1],r=concat(r,i)));
    return(r) /* See the function "isin" at A092875 */}
    
  • PARI
    /* transform a sequence v by the rule r - Note: v could be replaced by a function, e.g. v[c] => prime(c) here */
    seqruletrans(v,r)={my(c=1,L=List(),t=0); r=Vecrev(binary(r),8); for(i=1,v[#v], v[c]A093515=seqruletrans(primes(10^4),110) \\ M. F. Hasler, Mar 01 2008, updated Jan 07 2019
    
  • PARI
    A121561_is_1(N,n=0)=vector(N,i, while(!isprime(n+=1)&&!isprime(n-1),);n) \\ M. F. Hasler, Mar 01 2008
    
  • PARI
    is(n)=isprime(n)||isprime(n-1) \\ M. F. Hasler, Jan 07 2019
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) or isprime(n-1)
    print(list(filter(ok, range(140)))) # Michael S. Branicky, Aug 10 2021

Formula

{a(n)} = A000040 U (A000040 + 1), where A000040 are the primes. - M. F. Hasler, Jan 07 2019
a(1) = 2, a(n) = a(n-1) + 1 if a(n-1) is prime, a(n) is the next prime after a(n-1) otherwise. - Luca Armstrong, Aug 10 2021

Extensions

Name changed by Antti Karttunen, Jan 07 2019

A373410 Minimum of the n-th maximal antirun of nonsquarefree numbers differing by more than one.

Original entry on oeis.org

4, 9, 25, 28, 45, 49, 50, 64, 76, 81, 99, 100, 117, 121, 125, 126, 136, 148, 153, 169, 172, 176, 189, 208, 225, 243, 244, 245, 261, 276, 280, 289, 297, 316, 325, 333, 343, 344, 351, 352, 361, 364, 369, 376, 388, 405, 424, 425, 441, 460, 476, 477, 496, 508, 513
Offset: 1

Author

Gus Wiseman, Jun 06 2024

Keywords

Comments

The maximum is given by A068781.
An antirun of a sequence (in this case A013929) is an interval of positions at which consecutive terms differ by more than one.
Consists of 4 and all nonsquarefree numbers n such that n - 1 is also nonsquarefree.

Examples

			Row-minima of:
   4   8
   9  12  16  18  20  24
  25  27
  28  32  36  40  44
  45  48
  49
  50  52  54  56  60  63
  64  68  72  75
  76  80
  81  84  88  90  92  96  98
  99
		

Crossrefs

Functional neighbors: A005381, A006512, A053806, A068781, A373408, A373409, A373412.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    First/@Split[Select[Range[100],!SquareFreeQ[#]&],#1+1!=#2&]

Formula

a(1) = 4; a(n>1) = A068781(n-1) + 1.

A373670 Numbers k such that the k-th run-length A110969(k) of the sequence of non-prime-powers (A024619) is different from all prior run-lengths.

Original entry on oeis.org

1, 5, 7, 12, 18, 28, 40, 53, 71, 109, 170, 190, 198, 207, 236, 303, 394, 457, 606, 774, 1069, 1100, 1225, 1881, 1930, 1952, 2247, 2281, 3140, 3368, 3451, 3493, 3713, 3862, 4595, 4685, 6625, 8063, 8121, 8783, 12359, 12650, 14471, 14979, 15901, 17129, 19155
Offset: 1

Author

Gus Wiseman, Jun 15 2024

Keywords

Comments

The unsorted version is A373669.

Examples

			The maximal runs of non-prime-powers begin:
   1
   6
  10
  12
  14  15
  18
  20  21  22
  24
  26
  28
  30
  33  34  35  36
  38  39  40
  42
  44  45  46
  48
  50  51  52
  54  55  56  57  58
  60
So the a(n)-th runs begin:
   1
  14  15
  20  21  22
  33  34  35  36
  54  55  56  57  58
		

Crossrefs

For nonsquarefree runs we have A373199 (if increasing), firsts of A053797.
For squarefree antiruns see A373200, unsorted A373128, firsts of A373127.
For composite runs we have A373400, unsorted A073051, firsts of A176246.
For prime antiruns we have A373402.
For runs of non-prime-powers:
- length A110969, firsts A373669, sorted A373670 (this sequence):
- min A373676
- max A373677
- sum A373678
For runs of prime-powers:
- length A174965
- min A373673
- max A373674
- sum A373675
A000961 lists the powers of primes (including 1).
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists the non-prime-powers, without 1 A024619.

Programs

  • Mathematica
    t=Length/@Split[Select[Range[10000],!PrimePowerQ[#]&],#1+1==#2&];
    Select[Range[Length[t]],FreeQ[Take[t,#-1],t[[#]]]&]

A373820 Run-lengths (differing by 0) of antirun-lengths (differing by > 2) of odd primes.

Original entry on oeis.org

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

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Run-lengths of the version of A027833 with 1 prepended.

Examples

			The antiruns of odd primes (differing by > 2) begin:
   3
   5
   7  11
  13  17
  19  23  29
  31  37  41
  43  47  53  59
  61  67  71
  73  79  83  89  97 101
 103 107
 109 113 127 131 137
 139 149
 151 157 163 167 173 179
 181 191
 193 197
 199 211 223 227
 229 233 239
 241 251 257 263 269
 271 277 281
with lengths:
1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, ...
with runs:
  1  1
  2  2
  3  3
  4
  3
  6
  2
  5
  2
  6
  2  2
  4
  3
  5
  3
  4
with lengths a(n).
		

Crossrefs

Run-lengths of A027833 (if we prepend 1), partial sums A029707.
For runs we have A373819, run-lengths of A251092.
Positions of first appearances are A373827, sorted A373826.
A000040 lists the primes.
A001223 gives differences of consecutive primes, run-lengths A333254, run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
For composite runs: A005381, A054265, A068780, A373403, A373404.

Programs

  • Mathematica
    Length/@Split[Length/@Split[Select[Range[3,1000],PrimeQ],#2-#1>2&]//Most]//Most

A373408 Minimum of the n-th maximal antirun of squarefree numbers differing by more than one.

Original entry on oeis.org

1, 2, 3, 6, 7, 11, 14, 15, 22, 23, 30, 31, 34, 35, 38, 39, 42, 43, 47, 58, 59, 62, 66, 67, 70, 71, 74, 78, 79, 83, 86, 87, 94, 95, 102, 103, 106, 107, 110, 111, 114, 115, 119, 123, 130, 131, 134, 138, 139, 142, 143, 146, 155, 158, 159, 166, 167, 174, 178, 179
Offset: 1

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The maximum is given by A007674.
An antirun of a sequence (in this case A005117) is an interval of positions at which consecutive terms differ by more than one.
Consists of 1 and all squarefree numbers n such that n - 1 is also squarefree.

Examples

			Row-minima of:
   1
   2
   3   5
   6
   7  10
  11  13
  14
  15  17  19  21
  22
  23  26  29
  30
  31  33
  34
  35  37
  38
  39  41
  42
  43  46
  47  51  53  55  57
		

Crossrefs

Functional neighbors: A005381, A006512, A007674, A072284, A373127, A373410, A373411.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    First/@Split[Select[Range[100],SquareFreeQ],#1+1!=#2&]//Most

Formula

a(1) = 1; a(n>1) = A007674(n-1) + 1.

A144925 Number of nontrivial divisors of the n-th composite number.

Original entry on oeis.org

1, 2, 2, 1, 2, 4, 2, 2, 3, 4, 4, 2, 2, 6, 1, 2, 2, 4, 6, 4, 2, 2, 2, 7, 2, 2, 6, 6, 4, 4, 2, 8, 1, 4, 2, 4, 6, 2, 6, 2, 2, 10, 2, 4, 5, 2, 6, 4, 2, 6, 10, 2, 4, 4, 2, 6, 8, 3, 2, 10, 2, 2, 2, 6, 10, 2, 4, 2, 2, 2, 10, 4, 4, 7, 6, 6, 6, 2, 10, 6, 2, 8, 6, 2, 4, 4, 2, 2, 14, 1, 2, 2, 4, 2, 10, 6, 2, 6
Offset: 1

Author

Huen Yeong Kong (cosmology(AT)pacific.net.sg), Sep 25 2008

Keywords

Comments

1 and the number itself are excluded as divisors.
First occurrence of k: 1, 2, 9, 6, 45, 14, 24, 32, 851, 42, 3531, 148, 109, 89, 58993, 138, ..., which corresponds to the composite number (A005179): 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60, 4096, 192, 144, 120, 65536, 180, ..., . - Robert G. Wilson v, Aug 30 2009
Row lengths of table in A163870. - Reinhard Zumkeller, Mar 29 2014

Crossrefs

Programs

  • Haskell
    a144925 = length . a163870_row  -- Reinhard Zumkeller, Mar 29 2014
  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi@# + 1 &, n + PrimePi@n + 1]; f[n_] := DivisorSigma[0, n] - 2; Table[f@ Composite@ n, {n, 101}] (* Robert G. Wilson v, Aug 30 2009 *)
    DivisorSigma[0,#]-2&/@Select[Range[300],CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 15 2018 *)
  • PARI
    k=1;vector(120,n,while(isprime(k++),0);numdiv(k)-2)
    

Formula

a(n) = A070824(A002808(n)) = A000005(A002808(n)) - 2.
A144925(n) = A070824(A002808(n)) = A000005(A002808(n)) - 2. - Robert G. Wilson v, Aug 30 2009

Extensions

Sequence extended by Juri-Stepan Gerasimov, Aug 05 2009
Edited and extended by Franklin T. Adams-Watters, Aug 30 2009
Previous Showing 21-30 of 46 results. Next