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: Inigo Quilez

Inigo Quilez's wiki page.

Inigo Quilez has authored 3 sequences.

A380359 a(n) is the number of integers in base n such that all the integers given by their first k digits are divisible by k and which cannot be extended further.

Original entry on oeis.org

1, 3, 8, 21, 54, 145, 367, 1039, 2492, 6709, 16799, 46610, 95597, 368134, 831886, 2245056, 6084180, 15798495, 41456343, 119786906, 292818176, 788255058, 2061079489, 5753392327, 14984432350
Offset: 2

Author

Inigo Quilez, Jan 22 2025

Keywords

Examples

			a(10)=2492 because from all A271374(10)=20457 polydivisible numbers, only 2492 cannot be further expanded into a larger polydivisible number. One such number is 4836545640368400: 4 is divisible by 1, 48 is divisible by 2, 483 is divisible by 3, 4836 is divisible by 4, and so on until 4836545640368400 which is divisible by 16; but one cannot extend it further since no digit (0 to 9) appended to 4836545640368400 would result in a number divisible by k=17.
		

Crossrefs

A357557 a(n) is the numerator of the coefficient c in the polynomial of the form y(x)=x^n+c such that starting with y(x)=x for n=1 each polynomial is C-1 continuous with the previous one.

Original entry on oeis.org

0, 1, 43, 3481, 12647597, 380547619, 340607106994117, 23867104301800579837, 13408353860832026243555117, 43926321999197203038889578577, 13055436009603783636664151666161626100547, 6766346844526064783736339920897644104961
Offset: 1

Author

Inigo Quilez, Oct 03 2022

Keywords

Comments

The polynomials y(x)=x^n+c(n) can only be connected at x=n/(n+1) and with coefficients c(n) = { 0, 1/4, 43/108, 3481/6912, ... }. The denominator of c(n) is A061464. The numerator is our sequence a(n)

Crossrefs

Cf. A061464 (denominators).

Programs

  • PARI
    a(n) = my(p=1); numerator(sum(i=2,n, p/(p=i^i))); \\ Kevin Ryde, Oct 03 2022

Formula

a(n) = numerator of Sum_{i=1..n} (i^i)/((i+1)^(i+1)).

A308879 a(n) is the n-digit integer m that maximizes sin(m).

Original entry on oeis.org

8, 33, 699, 9929, 51819, 573204, 4846147, 37362253, 288632526, 9251925681, 81129397337, 881156436695
Offset: 1

Author

Inigo Quilez, Feb 12 2020

Keywords

Comments

a(n) is also the n-digit integer that minimizes the mean square error of the approximation sin(x+m) for cos(x) over [0, 2*Pi].
Naturally, sin(a(n)) is the best approximation to 1 for an n-digit integer argument. a(n) is the closest integer to an n-digit number of the form (4k+1)*Pi/2. Often used to compute an approximated rotation matrix with just a few number of characters of code, as in M = sin(x+{0,699,-699,0}). It is not guaranteed that each term in the sequence produces a better approximation than the previous one, although numerical evidence suggests so. It is therefore also not guaranteed to be a subsequence of A046959.

Examples

			For n=3, a(3)=699 since no other 3-digit integer m makes sin(x+m) closer to cos(x) than m=699 does. For example, cos(4.5) = -0.210795799... and sin(4.5+699) = -0.215061112... and no other value of m will make the latter closer to the former.
		

Crossrefs

Cf. A046959.

Programs

  • C
    double e = 1.0;
      int b = 0, d=1, c=10;
      int a[10]; // print A to see the results
      for( int i=0; d<10; i++ )
      {
          double y = double(i*4+1)*PI/2.0;
          double z = round(y);
          double f = abs(z-y);
          int    w = int(z);
          if( w>=c ) { a[d]=b; c*=10; e=1.0; b=0; d++; }
          if( f< e ) { e=f; b=w; }
      }