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.

User: Aaron T Cowan

Aaron T Cowan's wiki page.

Aaron T Cowan has authored 2 sequences.

A361741 Starting positions of digit triples in the decimal expansion of Pi where the sum of the first 2 equals the third.

Original entry on oeis.org

1, 3, 10, 29, 61, 73, 83, 106, 117, 132, 177, 192, 195, 198, 241, 248, 251, 281, 309, 311, 333, 362, 381, 393, 432, 477, 486, 494, 504, 508, 525, 532, 536, 555, 602, 611, 628, 647, 662, 674, 689, 699, 710, 747, 755, 760, 771, 806, 853, 856, 887, 899, 927, 934, 966, 969, 989
Offset: 1

Author

Aaron T Cowan, Mar 22 2023

Keywords

Comments

The first digit of Pi, "3", is reckoned as position 1.
This pattern happens from the first digit of Pi, so it seems to be pretty basic.

Examples

			1 is the first term, since the first two digits 3 and 1 add up to 4.
3 is the second term, since 4 + 1 = 5.
10 is next, since 3 + 5 = 8.
		

Crossrefs

Programs

  • MATLAB
    p=char(vpa(pi,1000));p(2)='3';
    for i=2:strlength(p)-2
      if str2num(p(i))+str2num(p(i+1))==str2num(p(i+2)) fprintf('%i,',i-1)  end
    end

Formula

Integers k such that A000796(k) + A000796(k+1) = A000796(k+2).
Equivalently, A110883(k) = A000796(k+2).
In a random model of this sequence (call it A(n)), A(n) ~ kn with probability 1, where k = 200/11. - Charles R Greathouse IV, Mar 28 2023

A360790 Squared length of diagonal of right trapezoid with three consecutive prime length sides.

Original entry on oeis.org

8, 13, 41, 53, 137, 173, 305, 397, 533, 877, 977, 1373, 1697, 1885, 2245, 2813, 3517, 3737, 4493, 5077, 5345, 6277, 6953, 7937, 9413, 10217, 10613, 11465, 12077, 12785, 16165, 17165, 18869, 19325, 22237, 22837, 24665, 26605, 27925, 29933, 32141, 32765, 36497, 37253, 38953, 39745
Offset: 1

Author

Aaron T Cowan, Feb 20 2023

Keywords

Comments

The value d is the square of the length of the diagonal of a trapezoid with a height and bases that are consecutive primes, respectively. The diagonal length is calculated using the Pythagorean theorem, but this distance is squared so that the value is an integer.

Examples

			        p(2)=3
        _ _ _ _
a(1):  |        \  d^2=2^2+(5-3)^2=8
p(1)=2 |_ _ _ _ _\
        p(3)=5
        p(3)=5
        _ _ _ _ _ _
a(2):  |           \    d^2=3^2 + (7-5)^2 = 9+4 = 13
p(2)=3 |            \
       |_ _ _ _ _ _ _\
        p(4)=7
a(3)= 5^2+(11-7)^2 = 25+16 = 41
a(7)= 17^2+(23-19)^2=305 = 5*61
		

Crossrefs

Programs

  • MATLAB
    %shorter 1 line version
    arrayfun(@(p) p^2+(nextprime(nextprime(p+1)+1)-nextprime(p+1))^2,[primes(10^6)])
    
  • Mathematica
    Map[(#[[1]]^2 + (#[[3]] - #[[2]])^2) &, Partition[Prime[Range[50]], 3, 1]] (* Amiram Eldar, Feb 24 2023 *)
  • PARI
    a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2; \\ Michel Marcus, Feb 23 2023

Formula

a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2.
a(n) = A001248(n) + A076821(n+1). - Michel Marcus, Feb 23 2023