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: Christopher Hohl

Christopher Hohl's wiki page.

Christopher Hohl has authored 6 sequences.

A308572 a(n) = Fibonacci(2*prime(n)).

Original entry on oeis.org

3, 8, 55, 377, 17711, 121393, 5702887, 39088169, 1836311903, 591286729879, 4052739537881, 1304969544928657, 61305790721611591, 420196140727489673, 19740274219868223167, 6356306993006846248183, 2046711111473984623691759, 14028366653498915298923761, 4517090495650391871408712937
Offset: 1

Author

Christopher Hohl, Jun 08 2019

Keywords

Comments

This sequence is noteworthy in light of the congruence relation shared by a(n) and prime(n). Namely, for n > 2, a(n) == prime(n) (mod 10). That is, the last digit of prime(n) is 'preserved' as the last digit of a(n). See A007652.
As well, extending the notion, one notes that for k == 1 (mod 4), Fibonacci(2^k * prime(n)) == prime(n) (mod 10).
For any prime number p, the Fibonacci number F_(2p) == -(2p/5) (mod p), where -(2p/5) is the Legendre or Jacobi symbol. - Yike Li, Aug 30 2022

Examples

			a(4) = 377, because prime(4) = 7, 2*7 = 14, and Fibonacci(14) is 377.
		

Crossrefs

Programs

  • Maple
    f:= n -> combinat:-fibonacci(2*ithprime(n)):
    map(f, [$1..30]); # Robert Israel, Oct 23 2019
  • PARI
    a(n) = fibonacci(2*prime(n)); \\ Michel Marcus, Jun 08 2019

Formula

a(n) = A000045(A100484(n)). - Michel Marcus, Jun 08 2019

Extensions

More terms from Michel Marcus, Jun 08 2019

A307104 a(n) is the number which, when concatenated with A003226(n), the n-th automorphic number, gives (A003226(n))^2.

Original entry on oeis.org

0, 0, 2, 3, 6, 57, 141, 390, 8790, 82128, 11963, 793212, 835571, 5054322, 1661682, 75880433, 45322418, 619541169, 319375992, 6745157241, 3317093849, 66891312600, 843114912509, 9837094694375, 16065496578813, 35901922360062, 67557477392256, 547721051611007
Offset: 1

Author

Christopher Hohl, Mar 24 2019

Keywords

Comments

Let na and nb represent the indices of the preceding and next A003226(n)'s beginning with a 9, and where (na - nb) >= 3 (note that the first such 'zone' begins with an exception for which the index A003226(na) = 1). Then for na < n < nb and such that n == (na + 1) mod 2, it appears that A003226(n) - a(n) = A003226(n+1) - a(n+1) = k.
In such cases, it also appears that a(n)*a(n+1) = k^2 - k.

Examples

			For n=4, A003226(4)=6, (A003226(4))^2=36. So a(4)=3.
For n=13, A003226(13)=2890625, (A003226(13))^2=8355712890625. So a(13)=835571.
		

Crossrefs

Programs

  • PARI
    auto(n) = {n<3 & return(n-1); my(i=10, j=10, b=5, c=6, a=b); for( k=4, n, while(b<=a, b=b^2%i*=10); while(c<=a, c=(2-c)*c%j*=10); a=min(b, c)); a; } \\ A003226
    a(n) = {my(m = auto(n), dm = digits(m), dm2 = digits(m^2)); fromdigits(vector(#dm2 - #dm, k, dm2[k]));} \\ Michel Marcus, May 18 2019

Formula

a(n) = A003226(n)*(A003226(n) - 1) / 10^A055642(A003226(n)).

A306388 a(n) is a decimal number k having a length n binary expansion which encodes, from left to right at digit j, the coprimality (0) or non-coprimality (1) of j to n, for 1 < j <= n, except for the first digit, which is always 1.

Original entry on oeis.org

1, 3, 5, 13, 17, 61, 65, 213, 329, 885, 1025, 3933, 4097, 13781, 22121, 54613, 65537, 251741, 262145, 906613, 1364681, 3497301, 4194305, 16111453, 17859617, 55932245, 86282825, 225793493, 268435457, 1064687485, 1073741825, 3579139413, 5526297161, 14316688725
Offset: 1

Author

Christopher Hohl, Mar 01 2019

Keywords

Comments

Let Sum* be a special summation procedure carried out on the binary expansions of each of the decimal values produced by the following expression for all distinct prime factors of n. That is, when 'adding' the various binary expansions of said decimal results for each p dividing n, p prime, allow that 1 + q + r + ... + s = 1, and 0 + 0 + ... + 0 = 0. Then, Sum*_{p|n} 2^(p-1) * ((2^p+1) * 2^(n-p) - 2)/(2^p - 1) + 1, when reverted to decimal, gives a(n).
a(n) -in binary, and recorded as a triangle- gives a 'Totient map' for the naturals.
1 1
2 11
3 101
4 1101
5 10001
6 111101
7 1000001
8 11010101
9 101001001
10 1101110101
11 10000000001
12 111101011101
13 1000000000001
14 11010111010101
15 101011001101001
16 1101010101010101
...

Examples

			a(p), p prime, are always 2^(p-1)+1, a result of ((2^p+1)*2^(n-p)-2)/(2^p-1)- the main parenthetical term in Sum*- being equal to 1.
a(c), c composite, is computable as follows:
a(6) = 61 because 6 has the distinct prime factors 2 and 3. So, the special summation of 2^(2-1) * ((2^2 + 1) * 2^(6-2) - 2)/(2^2 - 1) + 1 = 53, a decimal number which has a length 6 binary expansion (110101), and 2^(3-1) * ((2^3 + 1) * 2^(6-3) - 2)/(2^3 - 1) + 1 = 41, another decimal number which has a length 6 binary expansion (101001), gives Sum* =
        110101
      + 101001
       _______
        111101, which, when reverted to decimal, gives a(6).
a(12) = 3933 because 12 has the distinct prime factors 2 and 3. So, the special summation of 2^(2-1) * ((2^2 + 1) * 2^(12-2) - 2)/(2^2 - 1) + 1 = 3413, a decimal number which has a length 12 binary expansion (110101010101), and 2^(3-1) * ((2^3 + 1) * 2^(12-3) - 2)/(2^3 - 1) + 1 = 2633, another decimal number which has a length 12 binary expansion (101001001001), gives Sum* =
        110101010101
      + 101001001001
       ______________
        111101011101, which, when reverted to decimal, gives a(12).
Likewise, a(30) = 1064687485 because 30 has the distinct prime factors 2, 3, and 5. So, the special summation of 2^(2-1) * ((2^2 + 1) * 2^(30-2) - 2)/(2^2 - 1) + 1 = 894784853 = 110101010101010101010101010101 (length 30), and 2^(3-1) *((2^3 + 1) * 2^(30-3) - 2)/(2^3 - 1) + 1 = 690262601 = 101001001001001001001001001001, and 2^(5-1) * ((2^5 + 1) * 2^(30-5) - 2)/(2^5 - 1) + 1 = 571507745 = 100010000100001000010000100001,  gives Sum* =
    110101010101010101010101010101
    101001001001001001001001001001
  + 100010000100001000010000100001
    ______________________________
    111111011101011101011101111101, which, when reverted to decimal, gives a(30).
		

Crossrefs

Cf. A054432.

Programs

  • Mathematica
    a[n_] := FromDigits[Boole@(#==1 || GCD[#,n] > 1) &/@ Range[n], 2]; Array[a, 30] (* Amiram Eldar, Mar 26 2019 *)
  • PARI
    a(n) = my(v=vector(n, k, if (k==1, 1, gcd(k, n) != 1))); fromdigits(v, 2); \\ Michel Marcus, Mar 28 2019

Extensions

More terms from Amiram Eldar, Mar 26 2019
Name clarified by Michel Marcus, Mar 28 2019

A306406 Numbers k such that the sum of the distinct prime divisors of the product of all legal permutations of the digits of k is equal to k-1.

Original entry on oeis.org

1, 6, 102, 543, 37008
Offset: 1

Author

Christopher Hohl, Feb 13 2019

Keywords

Comments

It appears that these constitute all of the 'non-degenerate' cases for k less than 10^8. That is, k is not allowed to have leading zeros, but all 'legal' permutations of k, where k has length m, must be of length m as well. Therefore leading zeros are allowed in the construction of the total permutation product.
From David A. Corneth, Feb 15 2019: (Start)
Let S(m) be the sum of the distinct prime divisors of the product of all legal permutations of the digits of m.
Let Z(m) be a number where a zero is inserted after the first digit of m (m > 0). For example, Z(1) = 10, Z(19) = 109.
All terms with at most k digits can be found by iterating only over terms in A179239 with at most k digits.
For example, 345 is in A179239. S(345) = S(543), namely 543. As 543 is a permutation of 345, s = 543 is in the sequence.
Similarily, 445 is in A179239 and S(445) = 341, 445 doesn't produce a term. As S(445) = S(454) = S(544), all these number don't produce a term and do not have to be checked.
We have S(Z(m)) >= S(m). Proof: The permutations of Z(m) give the same distinct prime factors as m does, and maybe more. Therefore, S(Z(m)) >= S(m).
This can be applied to eliminate candidates. For example, S(10378) = 1447642. The largest possible value a number with digits of Z(10378) = 100378 can have is 873100. But 1447642 > 873100. So 100378 can't produce a term and doesn't have to be checked.
To perhaps quickly eliminate a candidate without checking all permutations one might let the last digit d of a permutation be such that gcd(d, 10) = 1 to hopefully get large prime factors (if there is such d). For example, when checking if 1378 gives a candidate, start with the 12 permutations ending in 1 or 3.
To find S(m) where m has digits zero, one might use a known value of S(m') where m' has a digit 0 removed from m and proceed finding S(m) with permutations having leading nonzero digits only. (End)

Examples

			6 is a term because it is the product of its legal permutations. The distinct prime factors of 6 are 3 and 2, so 3+2=5 and 6-1=5.
102 is a term because the distinct prime factors of the product of its legal permutations, i.e., 102*120*210*201*21*12 = 130195900800, are 2,3,5,7,17, and 67. So, 2+3+5+7+17+67=101, and 102-1=101.
		

Crossrefs

Cf. A179239.

A318789 For n >= 3, a(n) is equal to n-1 plus the alternating sum of all consecutive prime gaps between odd primes <= n.

Original entry on oeis.org

2, 3, 2, 3, 6, 7, 8, 9, 6, 7, 10, 11, 12, 13, 10, 11, 14, 15, 16, 17, 14, 15, 16, 17, 18, 19, 26, 27, 26, 27, 28, 29, 30, 31, 38, 39, 40, 41, 38, 39, 42, 43, 44, 45, 42, 43, 44, 45, 46, 47, 54, 55, 56, 57, 58, 59, 54, 55, 58, 59, 60, 61, 62, 63, 58, 59, 60, 61, 66, 67, 66, 67, 68
Offset: 3

Author

Christopher Hohl, Dec 15 2018

Keywords

Comments

Beginning at prime(2)=3, group all primes into even/odd-indexed pairs, (prime(2n), prime(2n+1)). Then a(prime(2n)) and a(prime(2n+1)) are both equal to 2*A077133(n).
This sequence consists of runs of an even number of consecutive numbers. - David A. Corneth, Dec 18 2018

Examples

			a(12)=7 because the alternating sum of all consecutive prime gaps for all odd primes less than/equal to 12 is -2+2-4, and 11+(-2+2-4)=7.
a(13)=10 because the alternating sum of all consecutive prime gaps for all odd primes less than/equal to 13 is -2+2-4+2=-2, and 12+(-2+2-4+2)=10.
		

Programs

  • PARI
    first(n) = my(res = vector(n), p = 3, sgn = 1, primegap = 0); res[1] = 2; for(i = 2, n, res[i] = res[i-1]+1; if(isprime(i+2), sgn=-sgn; primegap = i+2-p; res[i]+=sgn*primegap; p = i+2)); res \\ David A. Corneth, Dec 18 2018

Formula

a(3) = 2. a(n + 1) = a(n) + 1 for composite n + 1. For prime n + 1, a(n + 1) = a(n) + 1 - (n + 1 - p) where p is the largest prime < (n + 1). - David A. Corneth, Dec 18 2018

A316935 a(n)=1; for n > 1, a(n) is the smallest number > n such that the concatenation of all terms from a(1) through a(n) is divisible by the concatenation of the integers 1 through n.

Original entry on oeis.org

1, 20, 54, 946, 8180, 93504, 878732, 6841732, 102829509, 19305995230, 1822646098871, 35208071275344, 8691465582891615, 2131922062844429082, 190058192685217102545, 9285111636083665154512, 565278857209893562444229, 49237824030642874847017458, 15301141018410914663693576388
Offset: 1

Author

Christopher Hohl, Dec 12 2018

Keywords

Examples

			Let I(n) be the concatenation of the integers 1 through n, and let T(n) be the concatenation of all terms from a(1) through a(n). Then a(n) is the least number which, when appended to T(n-1) -- with leading zeros disallowed -- forms a number T(n) that is strictly greater than I(n) and is a multiple of I(n).
a(1)=1, so T(1)=1. I(2)=12, so a(2)=20 because a(2) is the least number which, when appended to T(1), creates a number T(2) that is greater than I(2)=12 and evenly divisible by it, and the least number greater than 12 that begins with a 1 and is divisible by 12 is 120.
a(2) is not 08 because leading zeros are not allowed.
a(3)=54 because at a(3), I(3)=123, and T(2)=120, which means that T(3) must be 12054, since the least number greater than 123 that is divisible by it but has leading digits 120 is 12054.
From _David A. Corneth_, Dec 18 2018: (Start)
Let concat(v) be the concatenation of the elements of vector v. To find a(n) for n >= 3, we find the concatenation of the first n-1 terms. For n = 3, that's 120. We also find the concatenation of the first n positive integers, in this case, 123.
Concatenating 1 gives 1201. 1201 mod 123 = 94 < 123 - 8 so concatenating a 1-digit number without leading zeros doesn't work.
We carry on and compute 12010 mod 123 = 79 >= 123 - 89 so concatenating a 2-digit number without leading zeros works and we stop to find a(3) = 10 + 123 - 79 = 54. (End)
		

Crossrefs

Cf. A007908 (concatenation of the numbers from 1 to n).

Programs

  • Mathematica
    getRes[m_,k_,e_] := Module[{}, r = k-Mod[m*10^e,k]; If[r < 10^e && m*10^e+r != k, r += k*(1 + Floor[(10^(e - 1) - r)/k]); If[r>10^e, r=-1], r=-1]; r]; f[m_,k_] := Module[{e=1}, While[(r=getRes[m,k,e])<0, e++]; r]; t[n_] := FromDigits[ Flatten[IntegerDigits[ Range[n]]]]; a[1]=1; a[n_] := a[n] = f[FromDigits[ Flatten[IntegerDigits[Array[a, n-1]]]], t[n]]; Array[a, 20] (* Amiram Eldar, Dec 13 2018 *)
  • PARI
    first(n) = {my(res = [1,20]); for(i = 3, n, res = concat(res, [nxt(i, res)])); res}
    nxt(n, v) = {my(div = concatnums([1..n]), start = concatnums(v)); start = 10*start+1; f = 1; subt = 8; c = start % div; while(c < div - subt, start *= 10; f*=10; subt = 10*subt + 9; c = start % div); f + div - c}
    concatnums(v) = {my(res = v[1]); for(i = 2, #v, res *= 10^#Str(v[i]); res += v[i]); res} \\ David A. Corneth, Dec 18 2018

Extensions

a(8)-a(18) from Jon E. Schoenfield, Dec 13 2018
a(19) from David A. Corneth, Dec 18 2018