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-2 of 2 results.

A377305 Number of times A278603(n) has occurred among the terms of that sequence so far, i.e. among A278603(0..n).

Original entry on oeis.org

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

Views

Author

Tamas Sandor Nagy, Oct 23 2024

Keywords

Examples

			Among the terms of A278603 the value of A278603(14) = 4 occurs 3 times, counting as far as n = 14:
.
           n:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19  ...
 ------------------------------------------------------------------------------
  A278603(n):  0, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 5, 4, 3, 4, 5, 6, 7, 6, 5, ...
 ------------------------------------------------------------------------------
                                             *     *     *
       Count:                                1     2     3  -> therefore a(14) = 3.
.
The counting of equal altitude points is also explained with this diagram.
Up to and including A278603(14) = 4, climbing from origin, we touch 3 equal altitude
points at height 4 on the mountain at A278603(10) = 4, A278603(12) = 4, and A278603(14) = 4.
.
  Altitude 4              /\
  touched                /  \...
  3 times  _________/\__/
  reaching         /  \/
  n = 14      /\  /
           /\/  \/
          /
.
An array as a histogram that shows in rows the equal altitude points on the prime mountain, stacked into columns. The prime mountain is squashed horizontally like a concertina to bring its equal altitude points close together, left-justified, and so to create a compact visual form for analysis. The number of equal altitude points, a(n), so far as n, can be read from the column headings, here in the range of n = 0, ..., 186:
.
 Al-|
 ti-|                                 - a(n) -
 tu-|
 de |  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  ...
 ------------------------------------------------------------------------------------
  . | ...
 28 | 186 ...
 27 | 157 185 ...
 26 | 156 158 184 ...
 25 | 155 159 167 179 183 ...
 24 | 154 160 166 168 178 180 182 ...
 23 | 149 153 161 165 169 177 181 ...
 22 | 148 150 152 162 164 170 176 ...
 21 | 147 151 163 171 175 ...
 20 | 146 172 174 ...
 19 | 145 173 ...
 18 | 144 ...
 17 | 143 ...
 16 | 142 ...
 15 | 137 141 ...
 14 | 136 138 140 ...
 13 | 127 135 139 ...
 12 | 126 128 134 ...
 11 | 125 129 133 ...
 10 | 124 130 132 ...
  9 |  23  67 123 131 ...
  8 |  22  24  66  68 122 ...
  7 |  17  21  25  65  69  73  97 121 ...
  6 |  16  18  20  26  64  70  72  74  96  98 120 ...
  5 |  11  15  19  27  31  47  59  63  71  75  83  95  99 103 119 ...
  4 |  10  12  14  28  30  32  46  48  58  60  62  76  82  84  94 100 102 104 118 ...
  3 |   5   9  13  29  33  41  45  49  57  61  77  81  85  93 101 105 109 117 ...
  2 |   2   4   6   8  34  40  42  44  50  56  78  80  86  92 106 108 110 116 ...
  1 |   1   3   7  35  39  43  51  55  79  87  91 107 111 115 ...
  0 |   0  36  38  52  54  88  90 112 114 ...
 -1 |  37  53  89 113 ...
  . | ...
.
		

Crossrefs

Cf. A278603.

A282178 Primes for which the sum of all preceding odd-indexed prime gaps is exactly one greater than the sum of all preceding even-indexed prime gaps.

Original entry on oeis.org

3, 7, 43, 79, 107, 1471, 1579, 1663, 3491, 3547, 3659, 3691, 3719, 3779, 3823, 3851, 3947, 4079, 4583, 4679, 4703, 27271, 28643, 28663, 28711, 29023, 41603, 41651, 41999, 42443, 42787, 42899, 44263, 44279, 45971, 50599, 133979, 28335623
Offset: 1

Views

Author

Samuel B. Reid, Feb 07 2017

Keywords

Comments

If the counting numbers 1, 2, 3, ... are written out sequentially such that one unit is moved in a given direction each time a new number is written and such that the direction is reversed if and only if a prime number is reached, these are the primes that lie directly below the number 1.
Comments from N. J. A. Sloane, Dec 21 2019: (Start)
Let p(k) = k-th prime, Delta p(k) = p(k+1)-p(k). The sequence contains those primes q such that
Sum_{k odd, p(k+1) <= q} Delta p(k) = 1 + Sum_{k even, p(k+1) <= q} Delta p(k).
The boustrophedon path described in the first comment can be drawn as follows (it is very similar to the path in A330339):
-2.-1| 0..1..2..3..4..5..6..7..8..
----------------------------------
.....|.1..2
.....|.3
.....|....4..5
.....|.7..6
.....|....8..9.10.11
.....|......13.12
.....|.........14.15.16.17
.....|............19.18
.....|...............20.21.22.23
.....|......29.28.27.26.25.24
.....|.........30.31
37.36|35.34.33.32
...
The primes that fall in column 0 make up the sequence.
Thanks to Walter Trump for pointing out that this sequence is very similar to the Boustrophedon Primes sequence of A330339, and for correcting an omission in an earlier version of these comments.
The close relationship between the two sequences is demonstrated by the fact that the Boustrophedon Primes occur exactly when A330545 is 0, whereas the primes in the present sequence occur exactly when A330545 is 1 or 2.
Yet another way to relate the two sequences is to say that the present sequence gives all the primes > 2 in columns 1 and 2 of the triangle in A330339.
(End)
The primes (other than 2) occur only in even-numbered columns: primes congruent to 3 mod 4 occur in columns congruent to 0 mod 4, and primes congruent to 1 mod 4 occur in columns congruent to 2 mod 4. See the "Notes" link for proof. In particular, a(n) == 3 mod 4.- N. J. A. Sloane, Jan 04 2020
Frank Stevenson's data seems to suggest that a(n) is roughly growing like n^c where c is about 2.74. - N. J. A. Sloane, Dec 31 2019

Crossrefs

Cf. A001223, A330339 (Boustrophedon primes), A330545, A330547, A278603.
The indices of these primes are given by A127596.

Programs

  • Mathematica
    With[{s = Differences@ Prime@ Range[10^5]}, Prime[1 + Position[Array[Total@ Take[s, {1, #, 2}] - Total@ Take[s, {2, #, 2}] &, Length@ s], 1][[All, 1]] ] ]
  • PARI
    my(a=2,n=1,pp=2);forprime(p=3,47000000,n++;a+= (-1)^(n+1)*(p-pp);if(a==1,print1(p,", "));pp=p) \\ Hugo Pfoertner, Dec 23 2019
Showing 1-2 of 2 results.