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.

A082674 Constant term when a polynomial of degree n is fitted to the lower members of the first n+1 twin prime pairs.

This page as a plain text file.
%I A082674 #25 Apr 05 2024 12:39:32
%S A082674 1,5,9,19,41,87,187,425,1041,2689,7031,18015,44503,105503,240267,
%T A082674 527035,1116023,2283321,4509661,8574251,15613035,26989459,43596473,
%U A082674 63714861,77517775,54160583,-87072621,-539390369,-1742001769,-4661299497
%N A082674 Constant term when a polynomial of degree n is fitted to the lower members of the first n+1 twin prime pairs.
%F A082674 a(n) = A082675(n) - 2.
%e A082674 A 5th-degree polynomial through the 6 points (1, 3), (2, 5), (3, 11), (4, 17), (5, 29), (6, 41) has constant term 41.
%p A082674 A088460 := proc(n) local i,p ; i := 1 ; p := 0 ; while true do while ithprime(i+1)-ithprime(i) <> 2 do i := i+1 ; od ; p := p+1 ; if p = n then RETURN( ithprime(i) ) ; fi ; i := i+1 ; od ; end: A082674 := proc(n) local rhs,co, row,col; rhs := linalg[vector](n+1) ; co := linalg[matrix](n+1,n+1) ; for row from 1 to n+1 do rhs[row] := A088460(row) ; for col from 1 to n+1 do co[row,col] := row^(col-1) ; od ; od ; linalg[linsolve](co,rhs)[1] ; end: for n from 1 to 30 do printf("%d,",A082674(n)) ; od ; # _R. J. Mathar_, Oct 31 2006
%Y A082674 Cf. A001359, A082594, A082675.
%K A082674 easy,sign
%O A082674 1,2
%A A082674 _Cino Hilliard_, May 19 2003
%E A082674 Corrected and extended by _R. J. Mathar_, Oct 31 2006